Update toolchain to nightly-03-02.#155
Merged
LegNeato merged 9 commits intoRust-GPU:mainfrom Mar 13, 2025
Merged
Conversation
This includes several updates to the backend based on changes in rustc_codegen_llvm, which brings some bug fixes and a refactor to debug info. This fixes failing dependencies that resolved to newer versions that failed to build on the previous nightly. Removes depending on rustc_codegen_llvm as it can't be imported with the new toolchain for some reason. The example cuda kernals fail to build. Their dependencies cause nvvm to abort with ICE.
Nvvm codegen compiles with latest nightly, and is able to codegen `core` and other essential crates. `libm` causes ICE and is next on the list to fix.
Previous change was just to get the backend to compile. This gets libm to compile now.
72ab072 to
02e3618
Compare
`register_attr` was removed in favor of `register_tool`. This updates how the nvvm attributes are applied in our proc_macros and how the nvvm backend parses them. Also removes redundant applications of no_std, as cuda_builder applies it to all crates built on the cuda target via rustc flags. The add example crate now compiles and runs the geneated ptx! :D
e3211cb to
b4e1d25
Compare
Contributor
|
I'm not qualified to review the LLVM side, the rust backend stuff looks sane. Let's land and iterate as it is strictly better than what is there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The purpose of this change is to update the rust toolchain to a more recent release; specifically,
nightly-2025-03-02.New toolchain means new rustc internal interface changes that needed to be made. Much of the logic is just copied from the llvm backend, with some changes to conform to nvvm specific logic and where assumptions of opaque pointers deviate with typed pointers. A major refactor to the debug metadata in the llvm backend was also brought in (though likely very unnecessary).
LLVM rust wrapper changes includes:
char*andsize_tlengths to createStringRefs internally.Changes to cuda_builder when building cuda targets include:
no_stdsaturating_float_casts=falseas nvvm does not support saturating float to int casts.nvvm_internalas a tool attribute in all cratesComplies and runs the
addexample. Neitherpath_traceror optix examples have been tested with these changes.Thanks to @apriori for attempting the previous port, which served as a helpful guide for this port.