Skip to content

Commit

Permalink
compiler nits
Browse files Browse the repository at this point in the history
  • Loading branch information
yourbuddyconner committed Sep 18, 2024
1 parent ca95892 commit 2e8b0a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl ProverClient {
#[cfg(not(feature = "cuda"))]
prover: Box::new(CpuProver::new()),
#[cfg(feature = "cuda")]
prover: Box::new(CudaProver::new()),
prover: Box::new(CudaProver::new(SP1Prover::new())),
},
"network" => {
cfg_if! {
Expand Down
7 changes: 3 additions & 4 deletions crates/sdk/src/provers/cuda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ pub struct CudaProver {

impl CudaProver {
/// Creates a new [CudaProver].
pub fn new() -> Self {
let prover = SP1Prover::new();
pub fn new(prover: SP1Prover) -> Self {
let cuda_prover = SP1CudaProver::new();
Self { prover, cuda_prover }
Self { prover, cuda_prover: cuda_prover.expect("Failed to initialize CUDA prover") }
}
}

Expand Down Expand Up @@ -102,6 +101,6 @@ impl Prover<DefaultProverComponents> for CudaProver {

impl Default for CudaProver {
fn default() -> Self {
Self::new()
Self::new(SP1Prover::new())
}
}

0 comments on commit 2e8b0a8

Please sign in to comment.