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

updates example compares Radix2 and MixedRadix NTTs #383

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

svpolonsky
Copy link
Contributor

Describe the changes

Update to cover new NTT algorithms

1. Define the size of the example
2. Initialize input
3. Run Radix2 NTT
4. Run MexedRadix NTT
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

int main(int argc, char* argv[])
{
std::cout << "Icicle Examples: Number Theoretical Transform (NTT)" << std::endl;
std::cout << "Example parameters" << std::endl;
const unsigned log_ntt_size = 20;
const unsigned log_ntt_size = 26;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that some CI machines may not have enough memory for that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@svpolonsky You can add the "examples" label here and it will run on a specific machine

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather keep things simple and use log_ntt_size = 20

err = NTT<S, E>(input, ntt_size, NTTDir::kForward, config, output);
END_TIMER(Radix2, "Radix2 NTT");

std::cout << "Validating output" << std::endl;
validate_output(ntt_size, nof_ntts, output);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is being validate here? note that radix2 is overriding the mixed-radix output

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out, I'll run validate twice for both ntt calls

@svpolonsky svpolonsky merged commit 49c7fb0 into dev Feb 21, 2024
14 checks passed
@svpolonsky svpolonsky deleted the temp/stas/update-ntt-example branch February 21, 2024 00:05
@jeremyfelder jeremyfelder mentioned this pull request Feb 22, 2024
jeremyfelder added a commit that referenced this pull request Feb 23, 2024
# Contents of this release

Examples: multi-gpu example #381
Examples: updates example compares Radix2 and MixedRadix NTTs #383
Feat: add vector operations bindings to Rust #384 
Examples: update examples with new vec ops #388 
Feat: Grumpkin curve implementation #379 
Feat: mixed-radix NTT fast twiddles mode #382 
Docs: Update README.md #385 #387 
README: Update Hall of Fame section #394 
Examples: add rust poseidon example #392 
Feat: GoLang bindings for v1.x #386
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants