[GH-ISSUE #358] [Feature request] Documented clangd setup for CUDA kernel indexing #169

Open
opened 2026-10-26 21:14:06 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @Rachmanino on GitHub (Jun 12, 2026).
Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/358

DeepGEMM already has a CMake path intended for IDE indexing, but clangd setup is currently not straightforward for CUDA headers.

In my local setup I needed:

  • a dedicated build-clangd directory with CMAKE_EXPORT_COMPILE_COMMANDS=ON
  • pybind11/Torch CMake prefixes passed explicitly
  • .clangd CUDA flags for .cuh files, e.g. -x cuda, --cuda-gpu-arch=sm_100, --cuda-path=...
  • removal of some nvcc-only flags
  • a few diagnostic suppressions for CUDA 13.x / SM100 false positives

Would the project be open to adding either:

  1. a short clangd setup section in the README, or
  2. a helper script such as scripts/configure_clangd.sh, or
  3. a checked-in template .clangd.example?

The goal would be reliable navigation/indexing for kernel development, not necessarily zero clang diagnostics for all CUDA intrinsics.

Originally created by @Rachmanino on GitHub (Jun 12, 2026). Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/358 DeepGEMM already has a CMake path intended for IDE indexing, but clangd setup is currently not straightforward for CUDA headers. In my local setup I needed: - a dedicated `build-clangd` directory with `CMAKE_EXPORT_COMPILE_COMMANDS=ON` - `pybind11`/Torch CMake prefixes passed explicitly - `.clangd` CUDA flags for `.cuh` files, e.g. `-x cuda`, `--cuda-gpu-arch=sm_100`, `--cuda-path=...` - removal of some nvcc-only flags - a few diagnostic suppressions for CUDA 13.x / SM100 false positives Would the project be open to adding either: 1. a short clangd setup section in the README, or 2. a helper script such as `scripts/configure_clangd.sh`, or 3. a checked-in template `.clangd.example`? The goal would be reliable navigation/indexing for kernel development, not necessarily zero clang diagnostics for all CUDA intrinsics.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepGEMM#169
No description provided.