Skip to content

Commit

Permalink
Using a feature to activate powdr acceleration.
Browse files Browse the repository at this point in the history
  • Loading branch information
lvella committed Nov 21, 2024
1 parent d20ac5b commit 3a942b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions plonky3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ nightly-features = [
"p3-mersenne-31/nightly-features",
"p3-poseidon2/nightly-features",
]
# As a guest in powdr, use accelerated machines.
powdr-accel = []

[dependencies]
powdr-ast.workspace = true
Expand Down
9 changes: 5 additions & 4 deletions plonky3/src/params/poseidon2/goldilocks/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#[cfg(not(all(target_os = "zkvm", target_arch = "riscv32")))]
#[cfg(not(feature = "powdr-accel"))]
mod software_impl;
#[cfg(not(all(target_os = "zkvm", target_arch = "riscv32")))]
#[cfg(not(feature = "powdr-accel"))]
pub use software_impl::*;

#[cfg(all(target_os = "zkvm", target_arch = "riscv32"))]
#[cfg(feature = "powdr-accel")]
mod powdr_accel_impl;
#[cfg(all(target_os = "zkvm", target_arch = "riscv32"))]
#[cfg(feature = "powdr-accel")]
pub use powdr_accel_impl::*;


use lazy_static::lazy_static;
use p3_goldilocks::Goldilocks;
use p3_poseidon2::poseidon2_round_numbers_128;
Expand Down

0 comments on commit 3a942b9

Please sign in to comment.