-
Notifications
You must be signed in to change notification settings - Fork 183
Incorrect arithmetics in large function #38
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
Labels
A-llvm
Relates to LLVM
bug
Something isn't working
C-rustc_codegen_nvvm
Category: the NVVM Rustc codegen
Comments
Does it work if you put release(false) for the cuda builder? |
With release(false) it fails to compile like this:
(upd: tried with clean target dir but got same error) |
huh, ill investigate soon, its probably something broken in how something is handled WRT LLVM. Tho i dont expect that failure to be related to the miscompile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-llvm
Relates to LLVM
bug
Something isn't working
C-rustc_codegen_nvvm
Category: the NVVM Rustc codegen
Hi
I am trying more examples with using crypto, and this time problem that I encounter is with integer arithmetic mismatch between GPU and CPU.
There is an example of the code: CPU and GPU
They both have same code of fiat_25519_to_bytes function, however result is slightly different for CPU and GPU
(note element 7 for example)
Understandably function is fairly large, however I was not able to reduce example. For instance, when trying to narrow down what happen I can see that basically result on this line is incorrect:
However, when taking this line out of context of large function it works perfectly fine on GPU, so the problem is likely with some kind of optimization that breaks integer arithmetics logic.
The text was updated successfully, but these errors were encountered: