-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[NVPTX] generated debug info uses features not available in older PTX versions #112998
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
Comments
@llvm/issue-subscribers-debuginfo Author: Artem Belevich (Artem-B)
Reproducer:
```
LLVM_PTXAS_EXECUTABLE=$HOME/local/cuda-11.8.0/bin/ptxas bin/llvm-lit -av $HOME/work/llvm/repo/llvm/test/DebugInfo/NVPTX/dbg-value-const-byref.ll
+ bin/llc -mtriple=nvptx64-nvidia-cuda
+ local/cuda-11.8.0/bin/ptxas -arch=sm_60 -c -
ptxas /tmp/lit-tmp-3piyjb1a/tmpxft_00096c16_00000000-0_stdin, line 91; error : Feature 'Defining labels in .section' requires PTX ISA .version 7.0 or later
ptxas fatal : Ptx assembly aborted due to errors
|
This was referenced Feb 4, 2025
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Feb 20, 2025
Pass through of target features to llvm-bitcode-linker and handling them When using the llvm-bitcode-linker (`linker-flavor=llbc`) target-features are not passed through and are not handled by it. The llvm-bitcode-linker is mainly used as a self contained linker to link llvm bitcode for the nvptx64 target. It uses `llvm-link`, `opt` and `llc` internally. To produce a `.ptx` file of a specific ptx-version it is necessary to pass the version to llc with the `--mattr` option. Without explicitly setting it, the emitted `.ptx`-version is the minimum supported version of the `--target-cpu`. I would like to be able to explicitly set the ptx version as [some llvm problems only occur in earlier `.ptx`-versions](llvm/llvm-project#112998). Therefore this pull request adds support for passing target features to llvm-bitcode-linker and handling them. I was not quite sure if adding these features to `rustc_target/src/target_features.rs` is necessary or not. If so I will gladly add these. r? `@kjetilkjeka`
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Feb 20, 2025
Pass through of target features to llvm-bitcode-linker and handling them When using the llvm-bitcode-linker (`linker-flavor=llbc`) target-features are not passed through and are not handled by it. The llvm-bitcode-linker is mainly used as a self contained linker to link llvm bitcode for the nvptx64 target. It uses `llvm-link`, `opt` and `llc` internally. To produce a `.ptx` file of a specific ptx-version it is necessary to pass the version to llc with the `--mattr` option. Without explicitly setting it, the emitted `.ptx`-version is the minimum supported version of the `--target-cpu`. I would like to be able to explicitly set the ptx version as [some llvm problems only occur in earlier `.ptx`-versions](llvm/llvm-project#112998). Therefore this pull request adds support for passing target features to llvm-bitcode-linker and handling them. I was not quite sure if adding these features to `rustc_target/src/target_features.rs` is necessary or not. If so I will gladly add these. r? ``@kjetilkjeka``
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 21, 2025
Rollup merge of rust-lang#136608 - kulst:ptx_target_features, r=bjorn3 Pass through of target features to llvm-bitcode-linker and handling them When using the llvm-bitcode-linker (`linker-flavor=llbc`) target-features are not passed through and are not handled by it. The llvm-bitcode-linker is mainly used as a self contained linker to link llvm bitcode for the nvptx64 target. It uses `llvm-link`, `opt` and `llc` internally. To produce a `.ptx` file of a specific ptx-version it is necessary to pass the version to llc with the `--mattr` option. Without explicitly setting it, the emitted `.ptx`-version is the minimum supported version of the `--target-cpu`. I would like to be able to explicitly set the ptx version as [some llvm problems only occur in earlier `.ptx`-versions](llvm/llvm-project#112998). Therefore this pull request adds support for passing target features to llvm-bitcode-linker and handling them. I was not quite sure if adding these features to `rustc_target/src/target_features.rs` is necessary or not. If so I will gladly add these. r? ``@kjetilkjeka``
github-merge-queue bot
pushed a commit
to rust-lang/rust-analyzer
that referenced
this issue
Feb 24, 2025
Pass through of target features to llvm-bitcode-linker and handling them When using the llvm-bitcode-linker (`linker-flavor=llbc`) target-features are not passed through and are not handled by it. The llvm-bitcode-linker is mainly used as a self contained linker to link llvm bitcode for the nvptx64 target. It uses `llvm-link`, `opt` and `llc` internally. To produce a `.ptx` file of a specific ptx-version it is necessary to pass the version to llc with the `--mattr` option. Without explicitly setting it, the emitted `.ptx`-version is the minimum supported version of the `--target-cpu`. I would like to be able to explicitly set the ptx version as [some llvm problems only occur in earlier `.ptx`-versions](llvm/llvm-project#112998). Therefore this pull request adds support for passing target features to llvm-bitcode-linker and handling them. I was not quite sure if adding these features to `rustc_target/src/target_features.rs` is necessary or not. If so I will gladly add these. r? ``@kjetilkjeka``
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Reproducer:
The label ptxas is unhappy about:
The text was updated successfully, but these errors were encountered: