halo2
halo2 copied to clipboard
Add `ec-gpu` support
We want to be able to leverage GPUs in halo2
, via the ec-gpu
crate. This requires two changes:
- The curve implementation needs to support producing the GPU kernel for finite field arithmetic.
-
halo2
needs to use GPU-aware MSM and FFT algorithms.
This issue covers the second change. We will need logic here that uses the CUDA/OpenCL source code generated by the ec-gpu-gen
crate to perform MSMs and FFTs. We will then need to integrate it in some way with our CPU-based implementations, ideally such that downstream consumers of the halo2
crate can control it.
As with other arithmetic, any code we bring into halo2
will ideally be temporary while we figure out the necessary APIs and integration. My goal is to land the generic code into a reusable crate, either somewhere like ff
or group
, or (perhaps more likely, to keep the DAG regular) a new crate.
just curious, any update on this one?
The ec-gpu
devs have just released a new version of the trait crate, which I believe is intended to help with the GPU side of this integration work.
Is there anyone working on producing GPU kernel for halo2 curve? if not, I'd like to give a try.
Is there GPU kernel for Halo2 curve now?