Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ func main() {

### GPU Support

#### Icicle Library
#### ICICLE Library

The following schemes and curves support experimental use of Ingonyama's Icicle GPU library for low level zk-SNARK primitives such as MSM, NTT, and polynomial operations:
The following schemes and curves support experimental use of Ingonyama's ICICLE GPU library for low level zk-SNARK primitives such as MSM, NTT, and polynomial operations:

- [x] [Groth16](https://eprint.iacr.org/2016/260)

Expand All @@ -184,7 +184,7 @@ You can then toggle on or off icicle acceleration by providing the `WithIcicleAc
proof, err := groth16.Prove(ccs, pk, secretWitness)
```

For more information about prerequisites see the [Icicle repo](https://github.com/ingonyama-zk/icicle).
For more information about prerequisites see the [ICICLE repo](https://github.com/ingonyama-zk/icicle). **NB! ICICLE CUDA kernels are covered by a special license for now. Follow the instructions to download and set up the kernels.**

## Citing

Expand Down
31 changes: 31 additions & 0 deletions backend/groth16/bn254/icicle/device.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//go:build icicle

package icicle

import (
"fmt"
"sync"

"github.com/consensys/gnark/logger"
icicle_runtime "github.com/ingonyama-zk/icicle/v3/wrappers/golang/runtime"
)

var onceWarmUpDevice sync.Once

func warmUpDevice() {
onceWarmUpDevice.Do(func() {
log := logger.Logger()
err := icicle_runtime.LoadBackendFromEnvOrDefault()
if err != icicle_runtime.Success {
panic(fmt.Sprintf("ICICLE backend loading error: %s", err.AsString()))
}
device := icicle_runtime.CreateDevice("CUDA", 0)
log.Debug().Int32("id", device.Id).Str("type", device.GetDeviceType()).Msg("ICICLE device created")
icicle_runtime.RunOnDevice(&device, func(args ...any) {
err := icicle_runtime.WarmUpDevice()
if err != icicle_runtime.Success {
panic(fmt.Sprintf("ICICLE device warmup error: %s", err.AsString()))
}
})
})
}
2 changes: 1 addition & 1 deletion backend/groth16/bn254/icicle/doc.go
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Package icicle_bn254 implements ICICLE acceleration for BN254 Groth16 backend.
package icicle_bn254
package icicle
Loading