diff --git a/prover/src/gpu/cuda/mod.rs b/prover/src/gpu/cuda/mod.rs index 66f9a7cdc..4cba716fe 100644 --- a/prover/src/gpu/cuda/mod.rs +++ b/prover/src/gpu/cuda/mod.rs @@ -1,6 +1,6 @@ //! This module contains GPU acceleration logic for Nvidia CUDA devices. -use std::{cell::RefCell, marker::PhantomData}; +use std::{cell::RefCell, marker::PhantomData, mem::MaybeUninit}; use air::{AuxRandElements, PartitionOptions}; use miden_gpu::{cuda::{constraint::CudaConstraintCommitment, merkle::MerkleTree, trace_lde::CudaTraceLde}, HashFn}; @@ -33,9 +33,9 @@ where D: Digest + From<[Felt; DIGEST_SIZE]> + Into<[Felt; DIGEST_SIZE]>, R: RandomCoin + Send, { - main: RefCell<&'g mut [Felt]>, - aux: RefCell<&'g mut [Felt]>, - ce: RefCell<&'g mut [Felt]>, + main: RefCell<&'g mut [MaybeUninit]>, + aux: RefCell<&'g mut [MaybeUninit]>, + ce: RefCell<&'g mut [MaybeUninit]>, pub execution_prover: ExecutionProver, pub hash_fn: HashFn, @@ -48,7 +48,7 @@ where D: Digest + From<[Felt; DIGEST_SIZE]> + Into<[Felt; DIGEST_SIZE]>, R: RandomCoin + Send, { - pub fn new(execution_prover: ExecutionProver, hash_fn: HashFn, main: &'g mut [Felt], aux: &'g mut [Felt], ce: &'g mut [Felt]) -> Self { + pub fn new(execution_prover: ExecutionProver, hash_fn: HashFn, main: &'g mut [MaybeUninit], aux: &'g mut [MaybeUninit], ce: &'g mut [MaybeUninit]) -> Self { CudaExecutionProver { main: RefCell::new(main), aux: RefCell::new(aux),