poly: add pass to convert poly.mul to use ntt ops#657
Merged
copybara-service[bot] merged 1 commit intoMay 28, 2024
Conversation
j2kun
approved these changes
May 1, 2024
Collaborator
|
Also please squash the commits when you're ready. Thanks! |
Contributor
Author
|
Great thanks. I will be AFK until the 15th, but can fix it up when I have my laptop again. Otherwise, feel free to apply your suggestions and merge. Sorry for the delay |
a4e1a3e to
9f7d696
Compare
- We can reduce complexity of polynomial multiplication by using the
number-theoretic transform
- Here we add a pass that will convert all poly.mul operations into a
poly.ntt of both operands -> modulus multiplication of the
coefficients -> poly.intt back into the polynomial type
Resolves google#541
9f7d696 to
3c56676
Compare
j2kun
approved these changes
May 20, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We can reduce complexity of polynomial multiplication by using the number-theoretic transform
Here we add a pass that will convert all poly.mul operations into a poly.ntt of both operands -> modulus multiplication of the coefficients -> poly.intt back into the polynomial type
Resolves #541