Skip to content

Use NVVM debug metadata merge behavior for native LTO - #1564

Open
tpn wants to merge 2 commits into
NVIDIA:mainfrom
tpn:codex/coop-interop-nvvm-debug
Open

tpn wants to merge 2 commits into
NVIDIA:mainfrom
tpn:codex/coop-interop-nvvm-debug

Conversation

@tpn

@tpn tpn commented Oct 20, 2026

Copy link
Copy Markdown

Native debug links can fail when Rust and nvcc LTO-IR disagree on the merge behavior of the Debug Info Version module flag. Emit NVVM’s required Error behavior for NVVM output while preserving ordinary LLVM’s Warning behavior and the metadata version.

Exporter tests cover direct LLVM and modern NVVM line/full debug modes. Local mixed Rust/native links retain line information and full CUBIN DWARF at sm_120 and sm_100; the existing legacy debug rejection is preserved.

The flag requirement is specified in NVVM source-level debugging support.

Signed-off-by: Trent Nelson <trent@trent.me>
@copy-pr-bot

copy-pr-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@nihalpasham nihalpasham added cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book llvm-export Textual LLVM/NVVM IR exporter (llvm-export crate) debug info Debug information in generated PTX/IR (line/source maps) bug Something isn't working interop Interop with external compilers / frontends labels Oct 21, 2026
Integrate the current main baseline and revalidate all debug exporter regressions and strict Clippy on the pinned stable compiler.

Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
@elibol

elibol commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

/ok to test a28eee3

@elibol

elibol commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Updated to a28eee3b48cdd9e36fee4ad97745e4bcc870cece by merging current main. The production change remains narrowly scoped to NVVM's Debug Info Version merge behavior.

All 26 debug-exporter tests and strict llvm-export --all-targets Clippy pass on the pinned stable toolchain. CI's example compilation and other completed checks pass; Rust CodeQL is still running. I have not repeated the author's mixed Rust/native sm_100/sm_120 link experiments; those remain the existing evidence in the description.

Included as a v0.5.0 debugging/interop candidate in #1606 and draft #1613. This is separate from the Tile source-location and CUDA-GDB breakpoint issues.

This branch has not been deployed

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

Labels

bug Something isn't working cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book debug info Debug information in generated PTX/IR (line/source maps) interop Interop with external compilers / frontends llvm-export Textual LLVM/NVVM IR exporter (llvm-export crate)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants