-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add amdgpu target #134740
base: master
Are you sure you want to change the base?
Add amdgpu target #134740
Conversation
The amdgpu backend makes heavy use of different address spaces. This leads to situations, where a pointer in one addrspace needs to be casted to a pointer in a different addrspace. `bitcast` is invalid for this case, `addrspacecast` needs to be used. Fix compilation failures that created bitcasts for such cases by creating pointer casts (which creates an `addrspacecast` under the hood) instead.
Document some instructions on how to build for the amdgpu target.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
These commits modify compiler targets. This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb This PR modifies If appropriate, please update |
r? jieyouxu |
cc @eddyb Hello, tagging you for domain expertise if you want to chime in. |
Thanks for the PR, @Flakebi. I'm going to request that you open a MCP at https://github.com/rust-lang/compiler-team/issues/ to gauge team consensus for adding this target, primarily to give compiler team members some opportunity to ask clarifying questions and register possible concerns, since:
Note that usually adding more "conventional" Tier 3 targets do not need to go through the MCP process, but this target looks not so conventional. |
@rustbot author |
Thank you for the quick review! I opened an MCP here: rust-lang/compiler-team#823 |
cc @ZuseZ4 |
Add amdgpu target to rustc and enable the LLVM target.
Fix compiling
core
with the amdgpu:The amdgpu backend makes heavy use of different address spaces. This
leads to situations, where a pointer in one addrspace needs to be casted
to a pointer in a different addrspace.
bitcast
is invalid for thiscase,
addrspacecast
needs to be used.Fix compilation failures that created bitcasts for such cases by
creating pointer casts (which creates an
addrspacecast
under the hood)instead.
Kinda related to the original amdgpu tracking issue #51575 (though that one has been closed for a while).