mirror of
https://github.com/eth-act/ere.git
synced 2026-02-19 11:54:42 -05:00
check for cuda or metal
This commit is contained in:
653
Cargo.lock
generated
653
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -17,5 +17,9 @@ tempfile = "3.3"
|
||||
serde_json = "1.0"
|
||||
thiserror = "2"
|
||||
|
||||
[features]
|
||||
metal = ["risc0-zkvm/metal"]
|
||||
cuda = ["risc0-zkvm/cuda"]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -29,6 +29,17 @@ impl EreRisc0 {
|
||||
program: <RV32_IM_RISCZERO_ZKVM_ELF as Compiler>::Program,
|
||||
resource_type: ProverResourceType,
|
||||
) -> Self {
|
||||
match resource_type {
|
||||
ProverResourceType::Cpu => {
|
||||
#[cfg(any(feature = "cuda", feature = "metal"))]
|
||||
panic!("CPU mode requires both 'cuda' and 'metal' features to be disabled");
|
||||
}
|
||||
ProverResourceType::Gpu => {
|
||||
#[cfg(not(any(feature = "cuda", feature = "metal")))]
|
||||
panic!("GPU selected but neither 'cuda' nor 'metal' feature is enabled");
|
||||
}
|
||||
}
|
||||
|
||||
Self {
|
||||
program,
|
||||
resource_type,
|
||||
|
||||
Reference in New Issue
Block a user