-
Notifications
You must be signed in to change notification settings - Fork 213
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
Disable f128 for amdgpu #737
Conversation
`compiler_builtins` fails to compile to amdgpu if f128 is enabled. The reason seems to be that compiler_builtins uses libcalls in the implementation. I’m not really familiar with what libcalls are, but the LLVM amdgpu backend explicitly does not support them. Error message: ``` LLVM ERROR: unsupported libcall legalization ```
Looks reasonable to me, would you be able to file an LLVM issue and add a link in the comment? |
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes!
After #731 merges, you can submit a PR to rust-lang/rust to update to 0.1.140. Feel free to |
Also @Flakebi if you get the chance, could you post the whole error message / backtrace here? I’m curious where exactly this is failing. I have to expect it’s something like multiplication routines not being able to call addition on f128 (which should just be a libcall to addtf3, also provided in this crate).
For context, basic operations (add, subtract, etc), intrinsics (in Rust) and builtins (name for intrinsics in C) get sent to the backend as something like I’m not an LLVM expert but I think the error is just saying that it’s trying to turn something like f128 + f128 into a libcall since there is no asm routine, but it hasn’t been taught it can do this by calling __addtf3. |
Nothing significant here, just syncing the following small changes: - rust-lang/compiler-builtins#727 - rust-lang/compiler-builtins#730 - rust-lang/compiler-builtins#736 - rust-lang/compiler-builtins#737
Nothing significant here, just syncing the following small changes: - rust-lang/compiler-builtins#727 - rust-lang/compiler-builtins#730 - rust-lang/compiler-builtins#736 - rust-lang/compiler-builtins#737
Update `compiler-builtins` to 0.1.140 Nothing significant here, just syncing the following small changes: - rust-lang/compiler-builtins#727 - rust-lang/compiler-builtins#730 - rust-lang/compiler-builtins#736 - rust-lang/compiler-builtins#737
Rollup merge of rust-lang#134832 - tgross35:update-builtins, r=tgross35 Update `compiler-builtins` to 0.1.140 Nothing significant here, just syncing the following small changes: - rust-lang/compiler-builtins#727 - rust-lang/compiler-builtins#730 - rust-lang/compiler-builtins#736 - rust-lang/compiler-builtins#737
Nothing significant here, just syncing the following small changes: - rust-lang/compiler-builtins#727 - rust-lang/compiler-builtins#730 - rust-lang/compiler-builtins#736 - rust-lang/compiler-builtins#737
Update `compiler-builtins` to 0.1.140 Nothing significant here, just syncing the following small changes: - rust-lang/compiler-builtins#727 - rust-lang/compiler-builtins#730 - rust-lang/compiler-builtins#736 - rust-lang/compiler-builtins#737
I think I made a slight mistake and should have checked for
It fails to compile here, because that’s the (only?) place where compiler-builtins uses a builtin itself: compiler-builtins/src/float/pow.rs Lines 41 to 46 in ff0ca1f
More details about why this fails are in llvm/llvm-project#121122 |
The __powitf2 function shouldn't be compiled at all if f128 is correctly disabled. |
Right, compiler-builtins compiles correctly (without __powitf) if f128 is disabled :) (Sorry, I mixed two points in the previous comment, (1) about the arch name and (2) about your previous question about where exactly it failed without disabling f128.) |
compiler_builtins
fails to compile to amdgpu if f128 is enabled. The reason seems to be that compiler_builtins uses libcalls in the implementation. I’m not really familiar with what libcalls are, but the LLVM amdgpu backend explicitly does not support them.Error message:
(The amdgpu target is not yet supported in rustc, there is an open PR here: rust-lang/rust#134740)