Skip to content

About

Frameworks: CUDA

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CUDA support for Consulo

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.

Features

  • Editor: .cu and .cuh are preprocessed as nvcc's host pass preprocesses them: __CUDACC__ and the other macros of nvcc, the toolkit's include directories, and cuda_runtime.h above 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 .cu files builds with nvcc into out/cuda/<module> (Build menu, or before a launch). The "CUDA Application" run configuration starts it; one is created from the gutter icon on main in a .cu file. 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 CUDA configure even when nvcc is not on the PATH: CMake is given the toolkit's nvcc as CUDACXX. 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_89 for compute capability 8.9), sm_75 when there is none.

Requirements

  • The NVIDIA CUDA Toolkit. It is found through $CUDA_PATH, $CUDA_HOME, /opt/cuda, /usr/local/cuda or nvcc on the PATH.
  • A host compiler nvcc supports (gcc or clang on Linux).
  • An NVIDIA GPU to run and debug the programs; the editor works without one.

Modules

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)

Metal and OpenCL

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.

Building

mvn package

The plugin depends on consulo.cpp, consulo.nativeDev and, optionally, consulo.cmake.

Origin

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.

License

Apache License 2.0, see LICENSE.

About

Frameworks: CUDA

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages