llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.96k stars 11.53k forks source link

cuda compilation fails when compiling in debug mode #77009

Open rnburn opened 8 months ago

rnburn commented 8 months ago

I'm getting this error when I compile my project with debug information. (Note: I don't get the error if I don't compile in debug mode).

> bazel run -c dbg //cbindings:inner_product_proof.t
INFO: Analyzed target //cbindings:inner_product_proof.t (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/rnburn/proj/blitzar/sxt/scalar25/operation/BUILD:193:17: Compiling sxt/scalar25/operation/inv.cc failed: (Exit 1): clang failed: error executing command (from target //sxt/scalar25/operation:inv) /nix/store/42m4mx42crcs69qjbwalxyfkki3vdg0p-clang/bin/clang -x cu '--cuda-gpu-arch=sm_70' '--cuda-gpu-arch=sm_70' -fcuda-rdc '--cuda-path=/nix/store/qwgadf4020xmcm94qf1nfv5lqhj12ca8-cudaWrapped' ... (remaining 303 arguments skipped)
ptxas /tmp/nix-shell.F1zjsp/inv-sm_70-f09d7f.s, line 1975; fatal   : Parsing error near '.': syntax error
ptxas fatal   : Ptx assembly aborted due to errors
clang: error: ptxas command failed with exit code 255 (use -v to see invocation)
clang version 18.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /nix/store/42m4mx42crcs69qjbwalxyfkki3vdg0p-clang/bin
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/nix-shell.F1zjsp/inv-d9ea5d.cu
clang: note: diagnostic msg: /tmp/nix-shell.F1zjsp/inv-sm_70-b5c70f.cu
clang: note: diagnostic msg: /tmp/nix-shell.F1zjsp/inv-d9ea5d.sh
clang: note: diagnostic msg:

********************
Target //cbindings:inner_product_proof.t failed to build
rnburn commented 8 months ago

bug.zip

rnburn commented 8 months ago

I'm using a version of clang built from the commit fdbff88

This is a nix flake for the build environment: https://github.com/spaceandtimelabs/blitzar/blob/0f7e326e8e939855f2d4cac2f528b3b982672279/nix/clang.nix

Artem-B commented 8 months ago

Seems to be the same issue as #58491