Skip to content

fix(cuda.core): let cuda-gdb display source for JIT-compiled kernels - #2678

Open
brandon-b-miller wants to merge 2 commits into
NVIDIA:mainfrom
brandon-b-miller:fix-program-debug
Open

fix(cuda.core): let cuda-gdb display source for JIT-compiled kernels#2678
brandon-b-miller wants to merge 2 commits into
NVIDIA:mainfrom
brandon-b-miller:fix-program-debug

Conversation

@brandon-b-miller

Copy link
Copy Markdown
Contributor

NVRTC appears to treat the program name passed as the path of the source file which it then propagates to the cubins dwarf table. However, Program compiles a string. So there's not actually a file at that path. cuda-gdb needs this to exist to show the source lines.

This PR proposes to fix this issue by creating a temporary file when debug is passed that exists for the process lifetime. This fix targets the use case of running the program containing the compilation through a cuda-gdb session and not any post-hoc debugging of such a program.

Closes #2385

@github-actions github-actions Bot added the cuda.core Everything related to the cuda.core module label Aug 20, 2026
@github-actions

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cuda.core: source-level cuda-gdb debugging broken for JIT kernels — NVRTC program name defaults to "default_program"

1 participant