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

Implement two-adic fields in MSL (Metal) #123

Closed
Tracked by #116
xqft opened this issue Feb 24, 2023 · 1 comment
Closed
Tracked by #116

Implement two-adic fields in MSL (Metal) #123

xqft opened this issue Feb 24, 2023 · 1 comment
Labels

Comments

@xqft
Copy link
Member

xqft commented Feb 24, 2023

We need operations over finite fields defined in the Metal Shading Language for implementing FFT (#116) and possibly other future algorithms in the GPU. So it's required to make implementations that mimic the ones we already have in Rust.

Some requirements:

  • Basic operations like sum, sub, mul, div.
  • Watch out for integer overflow, special care is needed to implement the mul operation for example.
  • Ideally we could build a field with a custom module (represented as an uint64_t or whichever type is needed)
  • MSL only supports up to 64-bit integers, so it would be needed to also implement classes for bigger ints (specifically see which fields with big integers there are implemented on Rust right now)
  • The work directory will be math/src/fft/metal/

Relevant resources:

  • MSL Specification (MSL is based on C++)
  • The Metal documentation and also see our metal_playground repo for examples on how to use the metal crate in Rust, useful for testing.
  • risc0 and ministark have some examples of prime fields implemented in C or MSL.
  • Us
  • General information about finite fields and modular arithmetic can be easily found on the web.
@xqft
Copy link
Member Author

xqft commented Apr 11, 2023

Done in #193

@xqft xqft closed this as completed Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant