Skip to content

Commit

Permalink
Update cargo, fix small circuit var name
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyfelder committed Dec 13, 2023
1 parent 15ca87a commit 80670f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ To go back to running with CPU, the previous environment variable must be **unse
unset ENABLE_ICICLE_GPU
```

>**NOTE:** Even with the above environment variable set, for circuits where k <= 8, icicle is only enabled in certain areas where batching MSMs will help; all other places will fallback to using CPU MSM. To change the value of `k` where icicle is enabled, you can set the environment variable `ICICLE_IS_SMALL_CIRCUIT`.
>**NOTE:** Even with the above environment variable set, for circuits where k <= 8, icicle is only enabled in certain areas where batching MSMs will help; all other places will fallback to using CPU MSM. To change the value of `k` where icicle is enabled, you can set the environment variable `ICICLE_SMALL_CIRCUIT`.
>
> Example: The following will cause icicle single MSM to be used throughout when k > 10 and CPU single MSM with certain locations using icicle batched MSM when k <= 10
>```sh
>export ICICLE_IS_SMALL_CIRCUIT=10
>export ICICLE_SMALL_CIRCUIT=10
>```
>
Expand Down
3 changes: 1 addition & 2 deletions halo2_proofs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ tabbycat = { version = "0.1", features = ["attributes"], optional = true }
halo2_legacy_pdqsort = { version = "0.1.0", optional = true }

# GPU Icicle integration
# icicle = { git = "https://github.com/ingonyama-zk/icicle.git", branch = "rust/large-bucket-factor-msm", optional = true }
icicle = { path = "../../../../icicle", optional = true }
icicle = { git = "https://github.com/ingonyama-zk/icicle.git", tag = "v0.1.0", optional = true }
rustacuda = { version = "0.1", optional = true }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion halo2_proofs/src/icicle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static mut GPU_G_LAGRANGE: Option<DeviceBuffer<PointAffineNoInfinity_BN254>> = N
static GPU_INIT: Once = Once::new();

pub fn is_small_circuit(size: usize) -> bool {
size <= (1 << u8::from_str_radix(&env::var("ICICLE_SMALL_K").unwrap_or("8".to_string()), 10).unwrap())
size <= (1 << u8::from_str_radix(&env::var("ICICLE_SMALL_CIRCUIT").unwrap_or("8".to_string()), 10).unwrap())
}

pub fn init_gpu<C: CurveAffine>(g: &[C], g_lagrange: &[C]) {
Expand Down

0 comments on commit 80670f2

Please sign in to comment.