Skip to content

Commit

Permalink
use icicle-jolt to compile cuda deps
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar-a16z committed Dec 16, 2024
1 parent 4a714c8 commit f65a0c7
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
17 changes: 9 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,29 @@ Examples in the [`examples`](./examples/) directory can be run using e.g.

```cargo run --release -p sha2-chain```

## CUDA Support

JOLT supports CUDA acceleration via [icicle](https://github.com/ingonyama-zk/icicle-jolt).

Dependencies:
1. Install [CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit)
2. Install [CMake](https://cmake.org/)

Now you may build Jolt with CUDA acceleration using the `--features icicle` flag.

### Build

```cargo build -p jolt-core --features icicle```

### Bench

```
# Set the icicle backend path - this won't be needed in the future
export ICICLE_BACKEND_INSTALL_DIR=$(pwd)/target/debug/deps/icicle/lib/backend
cargo bench --bench msm_batch --no-fail-fast -p jolt-core --features icicle
```

Note - NVIDIA doesn't support cross compilation on MacOS. Only Windows or Linux.

## Performance profiling

Expand Down
6 changes: 3 additions & 3 deletions jolt-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ name = "jolt_core"
path = "src/lib.rs"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
icicle-runtime = { git = "https://github.com/ingonyama-zk/icicle.git", tag = "v3.1.0", optional = true }
icicle-core = { git = "https://github.com/ingonyama-zk/icicle.git", tag = "v3.1.0", optional = true }
icicle-bn254 = { git = "https://github.com/ingonyama-zk/icicle.git", tag = "v3.1.0", optional = true }
icicle-runtime = { git = "https://github.com/ingonyama-zk/icicle-jolt.git", features = ["cuda_backend"], rev = "ed93e21", optional = true }
icicle-core = { git = "https://github.com/ingonyama-zk/icicle-jolt.git", rev = "ed93e21", optional = true }
icicle-bn254 = { git = "https://github.com/ingonyama-zk/icicle-jolt.git", features = ["cuda_backend"], rev = "ed93e21", optional = true }
memory-stats = "1.0.0"
sys-info = "0.9.1"
tokio = { version = "1.38.0", optional = true, features = ["rt-multi-thread"] }
Expand Down

0 comments on commit f65a0c7

Please sign in to comment.