From b74c2ac48bd25df0cbdee2e4b3871f63b631178d Mon Sep 17 00:00:00 2001 From: Dumi Loghin Date: Fri, 30 Aug 2024 14:48:25 +0800 Subject: [PATCH] update cryptography_cuda version and fix warnings --- Cargo.toml | 2 +- plonky2/src/hash/merkle_tree.rs | 2 +- plonky2/src/hash/poseidon2.rs | 15 --------------- plonky2/src/plonk/copy_constraint.rs | 1 + rust-toolchain.toml | 2 +- 5 files changed, 4 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6b603ed48b..7170e83811 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["field", "maybe_rayon", "plonky2", "starky", "util", "gen", "u32", "e resolver = "2" [workspace.dependencies] -cryptography_cuda = { git = "ssh://git@github.com/okx/cryptography_cuda.git", rev = "173510160183f3299f4765b30bd4f2c1685353f9" } +cryptography_cuda = { git = "ssh://git@github.com/okx/cryptography_cuda.git", rev = "73261c1420670cb371b359929df578edbb3b6a62" } ahash = { version = "0.8.7", default-features = false, features = [ "compile-time-rng", ] } # NOTE: Be sure to keep this version the same as the dependency in `hashbrown`. diff --git a/plonky2/src/hash/merkle_tree.rs b/plonky2/src/hash/merkle_tree.rs index ac909604ce..f3b4f50488 100644 --- a/plonky2/src/hash/merkle_tree.rs +++ b/plonky2/src/hash/merkle_tree.rs @@ -14,7 +14,7 @@ use cryptography_cuda::device::memory::HostOrDeviceSlice; #[cfg(feature = "cuda")] use cryptography_cuda::device::stream::CudaStream; #[cfg(feature = "cuda")] -use cryptography_cuda::merkle::bindings::{ +use cryptography_cuda::{ fill_digests_buf_linear_gpu_with_gpu_ptr, fill_digests_buf_linear_multigpu_with_gpu_ptr, }; use num::range; diff --git a/plonky2/src/hash/poseidon2.rs b/plonky2/src/hash/poseidon2.rs index 15a854899e..1f99e33ac6 100644 --- a/plonky2/src/hash/poseidon2.rs +++ b/plonky2/src/hash/poseidon2.rs @@ -389,9 +389,6 @@ where } } -#[derive(Debug, Clone, Default)] -struct DiffusionMatrixGoldilocks; - pub fn matmul_internal( state: &mut [F; SPONGE_WIDTH], mat_internal_diag_m_1: [u64; SPONGE_WIDTH], @@ -403,18 +400,6 @@ pub fn matmul_internal( } } -impl P2Permutation<[F; 12]> for DiffusionMatrixGoldilocks { - #[cfg(not(target_feature = "avx2"))] - fn permute_mut(&self, state: &mut [F; 12]) { - matmul_internal::(state, MATRIX_DIAG_12_GOLDILOCKS); - } - - #[cfg(target_feature = "avx2")] - fn permute_mut(&self, state: &mut [F; 12]) { - matmul_internal_avx::(state, MATRIX_DIAG_12_GOLDILOCKS); - } -} - pub trait Poseidon2: RichField { // const WIDTH: usize = 12; // const D: u64 = 7; diff --git a/plonky2/src/plonk/copy_constraint.rs b/plonky2/src/plonk/copy_constraint.rs index 6868650dfe..f5b6f19345 100644 --- a/plonky2/src/plonk/copy_constraint.rs +++ b/plonky2/src/plonk/copy_constraint.rs @@ -7,6 +7,7 @@ use crate::iop::target::Target; #[derive(Debug, Clone)] pub struct CopyConstraint { pub pair: (Target, Target), + #[allow(dead_code)] pub name: String, } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index e0a216c974..639d6a3056 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2024-01-16" +channel = "nightly" components = [] targets = [] profile = "default"