CUDA C++ in Consulo, built on the C/C++ plugin: .cu and
.cuh are C++ files there, and this plugin gives them what nvcc gives them.
- Editor:
.cuand.cuhare preprocessed as nvcc's host pass preprocesses them:__CUDACC__and the other macros of nvcc, the toolkit's include directories, andcuda_runtime.habove the first line. Highlighting, go to declaration, find usages and completion come from the C/C++ plugin, into the toolkit's headers (threadIdx,cudaMalloc,cudaError_t, ...). Kernel launches,kernel<<<grid, block, shared, stream>>>(args), are parsed by the C/C++ plugin. - Toolkit headers: a C/C++ module configured by hand gets an editor banner to attach the CUDA toolkit as a library, so the toolkit's own headers are parsed with nvcc's macros too. CMake and Make projects need nothing: their import attaches the include directories.
- Build and run, without a build system: a C/C++ module with
.cufiles builds with nvcc intoout/cuda/<module>(Build menu, or before a launch). The "CUDA Application" run configuration starts it; one is created from the gutter icon onmainin a.cufile. nvcc's errors and warnings are listed in the Build window and link to their lines. - Debug: "CUDA Application" debugs with NVIDIA cuda-gdb from the toolkit, with breakpoints in kernels. A debug
build adds
-G(device debug info). - CMake: projects with
LANGUAGES CUDAconfigure even when nvcc is not on thePATH: CMake is given the toolkit's nvcc asCUDACXX. cuda-gdb can be chosen as the debugger of a CMake target. - GPU architecture: taken from the GPU of the machine (
nvidia-smi, e.g.sm_89for compute capability 8.9),sm_75when there is none.
- The NVIDIA CUDA Toolkit. It is found through
$CUDA_PATH,$CUDA_HOME,/opt/cuda,/usr/local/cudaornvccon thePATH. - A host compiler nvcc supports (gcc or clang on Linux).
- An NVIDIA GPU to run and debug the programs; the editor works without one.
| Module | Artifact | Contents |
|---|---|---|
toolkit |
consulo.cuda-toolkit |
Finding the toolkit and probing nvcc for its macros and include directories; parsers for the output of nvcc, compute-sanitizer and nvidia-smi topo -m; an occupancy calculator; a catalog of builtins |
cpp |
consulo.cuda-cpp |
.cu/.cuh file types, the options of CUDA files, the toolkit library, the nvcc build, the "CUDA Application" run configuration and the cuda-gdb debugger |
cmake |
consulo.cuda-cmake |
CMake integration, loaded only with the CMake plugin |
plugin |
consulo.cuda |
The installable plugin |
it |
consulo.cuda-it |
Integration tests with a headless IDE (skipped without a toolkit in /opt/cuda) |
This plugin is about CUDA only. Metal Shading Language support is moving to the shader plugin,
consulo-shader, next to GLSL and HLSL. That move includes the Metal part
of the builtin catalog in toolkit and examples/simple_kernel.metal, which are only kept here until then.
mvn packageThe plugin depends on consulo.cpp, consulo.nativeDev and, optionally, consulo.cmake.
This plugin started as a fork of
GPU Dev Accelerator Ultimate by Jakub Jirák, an IntelliJ
plugin licensed under the Apache License 2.0. The history kept here starts at its Apache-licensed release
(2026.8.0); each of those commits names its original with an Upstream-Commit: trailer. The output parsers, the
topology parser, the occupancy calculator and the builtin catalog of toolkit are ported from it, and say so in
their headers. See NOTICE.
Apache License 2.0, see LICENSE.