-
Notifications
You must be signed in to change notification settings - Fork 183
curve25519_dalek crate = runtime error #208
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
Closed
Comments
|
I don't have a ton of time right now to help you debug, but I wanted to pop in and say thank you for the great bug reports and pointers to the repo. Makes it a lot easier when one of us has time! 🍻 |
LegNeato
added a commit
to LegNeato/Rust-CUDA
that referenced
this issue
May 24, 2025
It would always generate PTX to load only a 1-bit integer (`i1`) from the provided pointer, regardless of the actual size of `T`. The alignment specified for the load was also based on the pointer's alignment, not the pointee's alignment. This commit changes it to: 1. Load the full `llvm_type_of(T)` instead of `i1`. 2. Use the correct alignment of `T` for the load instruction. 3. Removes an incorrect pointer cast that was based on the return ABI of `T` rather than the type of the memory being read. Possibly fixes Rust-GPU#208.
LegNeato
added a commit
to LegNeato/Rust-CUDA
that referenced
this issue
May 24, 2025
It would always generate PTX to load only a 1-bit integer (`i1`) from the provided pointer, regardless of the actual size of `T`. The alignment specified for the load was also based on the pointer's alignment, not the pointee's alignment. This commit changes it to: 1. Load the full `llvm_type_of(T)` instead of `i1`. 2. Use the correct alignment of `T` for the load instruction. 3. Removes an incorrect pointer cast that was based on the return ABI of `T` rather than the type of the memory being read. Possibly fixes Rust-GPU#208.
LegNeato
added a commit
to LegNeato/Rust-CUDA
that referenced
this issue
May 24, 2025
It would always generate PTX to load only a 1-bit integer (`i1`) from the provided pointer, regardless of the actual size of `T`. The alignment specified for the load was also based on the pointer's alignment, not the pointee's alignment. This commit changes it to: 1. Load the full `llvm_type_of(T)` instead of `i1`. 2. Use the correct alignment of `T` for the load instruction. 3. Removes an incorrect pointer cast that was based on the return ABI of `T` rather than the type of the memory being read. Possibly fixes Rust-GPU#208.
LegNeato
added a commit
to LegNeato/Rust-CUDA
that referenced
this issue
May 24, 2025
It would always generate PTX to load only a 1-bit integer (`i1`) from the provided pointer, regardless of the actual size of `T`. The alignment specified for the load was also based on the pointer's alignment, not the pointee's alignment. This commit changes it to: 1. Load the full `llvm_type_of(T)` instead of `i1`. 2. Use the correct alignment of `T` for the load instruction. 3. Removes an incorrect pointer cast that was based on the return ABI of `T` rather than the type of the memory being read. Possibly fixes Rust-GPU#208.
LegNeato
added a commit
to LegNeato/Rust-CUDA
that referenced
this issue
May 24, 2025
It would always generate PTX to load only a 1-bit integer (`i1`) from the provided pointer, regardless of the actual size of `T`. The alignment specified for the load was also based on the pointer's alignment, not the pointee's alignment. This commit changes it to: 1. Load the full `llvm_type_of(T)` instead of `i1`. 2. Use the correct alignment of `T` for the load instruction. 3. Removes an incorrect pointer cast that was based on the return ABI of `T` rather than the type of the memory being read. Possibly fixes Rust-GPU#208.
LegNeato
added a commit
to LegNeato/Rust-CUDA
that referenced
this issue
May 26, 2025
This isn't fuly correct, as ideally we keep track of what we have put into constant memory and when it is filled up spill insead of only spilling when a static is big. But, this is materially better than what is there. Fixes Rust-GPU#208. See also the debugging and discussion in Rust-GPU#216
LegNeato
added a commit
to LegNeato/Rust-CUDA
that referenced
this issue
May 26, 2025
This isn't fully correct, as ideally we keep track of what we have put into constant memory and when it is filled up spill insead of only spilling when a static is big. But, this is materially better than what is there (which is a runtime error). An argument can be made to just _always_ use global memory and we don't have to worry about getting the packing right. Fixes Rust-GPU#208. See also the debugging and discussion in Rust-GPU#216
LegNeato
added a commit
to LegNeato/Rust-CUDA
that referenced
this issue
May 26, 2025
This isn't fully correct, as ideally we keep track of what we have put into constant memory and when it is filled up spill instdead of only spilling when a static is big. But, this is materially better than what is there (which is a runtime error). An argument can be made to just _always_ use global memory and we don't have to worry about getting the packing right. Fixes Rust-GPU#208. See also the debugging and discussion in Rust-GPU#216
LegNeato
added a commit
that referenced
this issue
May 26, 2025
* Allow address spaces to propagate to LLVM This looks like it was code that wasn't deleted after the refactor in decda87 * Spill large statics from constant to global memory This isn't fully correct, as ideally we keep track of what we have put into constant memory and when it is filled up spill instdead of only spilling when a static is big. But, this is materially better than what is there (which is a runtime error). An argument can be made to just _always_ use global memory and we don't have to worry about getting the packing right. Fixes #208. See also the debugging and discussion in #216 * Add `--use-constant-memory-space` flag, off by default * Make it clear that `#[cuda_std::address_space(constant)]` still works
LegNeato
added a commit
to LegNeato/Rust-CUDA
that referenced
this issue
May 27, 2025
It would always generate PTX to load only a 1-bit integer (`i1`) from the provided pointer, regardless of the actual size of `T`. The alignment specified for the load was also based on the pointer's alignment, not the pointee's alignment. This commit changes it to: 1. Load the full `llvm_type_of(T)` instead of `i1`. 2. Use the correct alignment of `T` for the load instruction. 3. Removes an incorrect pointer cast that was based on the return ABI of `T` rather than the type of the memory being read. Possibly fixes Rust-GPU#208.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure if this is helpful. Great crate + ecosystem, hope I'm helping trying to "real world use it". Please let me know how I can debug more to provide more meaningful report.
https://github.com/brandonros/ed25519-vanity-rs/tree/no-compact if needed for "full working example"
cc @jorge-ortega let me know if you want to work together on this if you have the cycles
The text was updated successfully, but these errors were encountered: