gnark icon indicating copy to clipboard operation
gnark copied to clipboard

FEAT: Add Icicle GPU-Accelleration to Plonk Prover behind build tag

Open bigsky77 opened this issue 1 year ago • 1 comments

Description

This PR adds experimental support for Icicle GPU acceleration library for Plonk backend and the BN254 curve.

Type of change

[X] New feature (non-breaking change which adds functionality)

How has this been tested?

[X] Using the circuits in gnark/examples/plonk/main.go

  1. Follow the instructions for setting up Icicle in the linked repository above
  2. From gnark run go run examples/plonk/main.go

[X] Using Ingonyama's fork of Succinct Lab's Gnark-Plonky2-Verifier

  1. From Gnark-Plonky2-Verifier run go run benchmarks.go --icicle

How has this been benchmarked?

Benchmarks ran on Gnark-Plonky2-Verifier using AWS: g5.8xlarge A10g 32 core 128GB.

Benchmarks can be seen here.

Note

These benchmarks are not final. We are still updating our Go Cuda bindings which will provide a significant speed-up to the NTT. Also note our Compute Quotient Polynomial is actively being refined to increase speed. The current implementation is ~20s slower than the ideal implementation due to the need to run CUDA processes synchronously. This will be updated when solved.

Dependencies

This merge requests depends on modifications to the following two repositories.

  1. IcicleGnark - Pull Request
  2. Gnark-Crypto - Pull Request

Checklist:

  • [X ] I have performed a self-review of my code
  • [ X] I have commented my code, particularly in hard-to-understand areas
  • [ X] I have made corresponding changes to the documentation
  • [ X] I have added tests that prove my fix is effective or that my feature works
  • [ X] I did not modify files generated from templates
  • [ X] golangci-lint does not output errors locally
  • [ X] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

bigsky77 avatar Feb 12 '24 21:02 bigsky77