Skip to content

Commit

Permalink
merge with latest dev
Browse files Browse the repository at this point in the history
  • Loading branch information
cliff0412 committed Apr 2, 2024
2 parents 608b1b7 + b8e4535 commit 2b8a72a
Show file tree
Hide file tree
Showing 14 changed files with 273 additions and 211 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ docs/**bench**
**/*/libposeidon-permute-c-mac.a
**/*/go-iden3-crypto/
node_modules
.vscode
.vscode
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "depends/cryptography_cuda"]
path = depends/cryptography_cuda
url = git@github.com:okx/cryptography_cuda.git
branch =5c5c3ca7987125507c8eb17572ecb355ffed2256
2 changes: 1 addition & 1 deletion depends/cryptography_cuda
4 changes: 2 additions & 2 deletions field/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ proc-macro2 = "1"
quote = "1"

[features]
default = ["no_cuda"]
cuda = ["cryptography_cuda"]
default = ["cryptography_cuda/no_cuda"]
cuda = ["cryptography_cuda/cuda"]
precompile = []
no_cuda = ["cryptography_cuda/no_cuda"]

Expand Down
3 changes: 2 additions & 1 deletion field/src/fft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use alloc::vec::Vec;
use core::cmp::{max, min};

#[cfg(feature = "cuda")]
use cryptography_cuda::{intt, ntt, types::NTTInputOutputOrder};
use cryptography_cuda::{ntt, types::NTTInputOutputOrder};
use plonky2_util::{log2_strict, reverse_index_bits_in_place};
use unroll::unroll_for_loops;

Expand Down Expand Up @@ -34,6 +34,7 @@ pub fn fft_root_table<F: Field>(n: usize) -> FftRootTable<F> {
root_table
}

#[allow(dead_code)]
#[cfg(feature = "cuda")]
fn fft_dispatch_gpu<F: Field>(
input: &mut [F],
Expand Down
5 changes: 2 additions & 3 deletions plonky2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ keywords.workspace = true
categories.workspace = true

[features]
default = ["gate_testing", "parallel", "rand_chacha", "std", "timing"]
default = ["gate_testing", "parallel", "rand_chacha", "std", "timing", "cryptography_cuda/no_cuda"]
gate_testing = []
parallel = ["hashbrown/rayon", "plonky2_maybe_rayon/parallel"]
std = ["anyhow/std", "rand/std", "itertools/use_std"]
timing = ["std", "dep:web-time"]
cuda =["cryptography_cuda"]
cuda =["cryptography_cuda/cuda"]
no_cuda = ["cryptography_cuda/no_cuda"]
batch =[]


[dependencies]
ahash = { workspace = true }
anyhow = { workspace = true }
Expand Down
Loading

0 comments on commit 2b8a72a

Please sign in to comment.