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

Implemented small Metal abstractions and make the FFT POC usable #193

Merged
merged 147 commits into from
Apr 11, 2023

Conversation

xqft
Copy link
Member

@xqft xqft commented Mar 20, 2023

Implemented small Metal abstractions and make the FFT POC usable

Description

This is a follow-up for #190 aiming to structure the gpu crate and to implement a small set of Metal abstractions and a API that wraps around these for creating all the necessary parallel operations for FFT (FFT itself, twiddle factors generation in different orders and bit-reversed permutation). Our FFT implementation is templated and can work with multiple prime field classes, currently only a u256 FP class was implemented in MSL which corresponds to the Stark252PrimeField in Rust.

This also paves the way for implementing parallel FFT in CUDA.

NOTE: right now the CI won't compile the metal module because the host doesn't support Metal. You will need to run tests locally.

Type of change

  • New feature

Checklist

  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.

@xqft xqft marked this pull request as ready for review April 10, 2023 15:36
gpu/src/metal/shaders/twiddles.h.metal Outdated Show resolved Hide resolved
@IAvecilla IAvecilla self-requested a review April 11, 2023 14:25
@xqft xqft added this pull request to the merge queue Apr 11, 2023
Merged via the queue into main with commit ded3f8f Apr 11, 2023
@xqft xqft deleted the metal-fft-api branch April 11, 2023 16:32
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.

None yet

6 participants