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

Add GPU Acceleration Support for KZG Commitments #486

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bigsky77
Copy link

Description

This pull-request adds support for running KZG Commitments on GPU within the icicle.go file. The reasoning for this commit is to provide GPU support for difficult to access functions such as OnDeviceBatchOpenSinglePoint which are hard/impossible to modify without forking the repository.

Running KZG commits on GPU is generally 3-4x faster than the equivalent on CPU.

Type of change

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

How has this been tested?

New test TestOnDeviceCommit has been added to ```test_kzg.go``. For the test to work the user will need to have compiled Icicle library in path.

Clone Icicle repository and checkout current Go language commit(our Go Icicle Cuda bindings are in the process of being updated)

cd icicle
git checkout 97f0079e5c71d0bd4b8b97fababcfdb9940f12e1

Build Icicle

   make libbn254.so

Once Icicle is compiled run tests inside gnark-crypto/ecc/bn254/kzg repository.

go test -run TestOnDeviceCommit

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
  • [ X] Any dependent changes have been merged and published in downstream modules

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants