Skip to content
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

NTT inplace in Rust #453

Merged
merged 2 commits into from
Apr 8, 2024
Merged

NTT inplace in Rust #453

merged 2 commits into from
Apr 8, 2024

Conversation

DmytroTym
Copy link
Contributor

Describe the changes

Due to Rust's ownership rules, we can't run NTT inplace using the ntt function. Which is why we saw a need to add a separate function a couple of times.

Incidentally an issue with radix-2 NTT was found when ran inplace, __syncthreads() was used in reverse order kernel as if it was a global barrier for all blocks and not block-local one. Thus data race happened that is fixed by this PR.

@LeonHibnik LeonHibnik merged commit b93b1d0 into main Apr 8, 2024
21 checks passed
@LeonHibnik LeonHibnik deleted the dima/ntt_inplace branch April 8, 2024 07:04
yshekel pushed a commit that referenced this pull request May 19, 2024
## Describe the changes

Due to Rust's ownership rules, we can't run NTT inplace using the
[`ntt`](https://github.com/ingonyama-zk/icicle/blob/v1.9.1/wrappers/rust/icicle-core/src/ntt/mod.rs#L139)
function. Which is why we saw a need to add a separate function a couple
of times.

Incidentally an issue with radix-2 NTT was found when ran inplace,
`__syncthreads()` was used in reverse order kernel as if it was a global
barrier for all blocks and not block-local one. Thus data race happened
that is fixed by this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants