pub struct GpuEngine<HS: GpuHashScheme> { /* private fields */ }Expand description
Generic GPU proving engine parameterised by a hash scheme.
Use the BabyBearPoseidon2GpuEngine type alias for the default Poseidon2 engine.
Implementations§
Source§impl<HS: GpuHashScheme> GpuEngine<HS>
impl<HS: GpuHashScheme> GpuEngine<HS>
pub fn device_mut(&mut self) -> &mut GpuDevice
pub fn config_mut(&mut self) -> &mut HS::SC
Source§impl<HS: GpuHashScheme> GpuEngine<HS>
impl<HS: GpuHashScheme> GpuEngine<HS>
pub fn new(params: SystemParams) -> Self
Trait Implementations§
Source§impl StarkEngine for GpuEngine<DefaultHashScheme>
impl StarkEngine for GpuEngine<DefaultHashScheme>
type SC = BabyBearPoseidon2Config
type PB = GenericGpuBackend<BabyBearPoseidon2HashScheme>
type PD = GpuDevice
type TS = DuplexSpongeGpu
Source§fn new(params: SystemParams) -> Self
fn new(params: SystemParams) -> Self
Constructor from only system parameters. In particular, the transcript and hasher must have
a default configuration.
fn config(&self) -> &Self::SC
fn device(&self) -> &Self::PD
fn proving_memory_config(&self) -> ProvingMemoryConfig
Source§fn initial_transcript(&self) -> Self::TS
fn initial_transcript(&self) -> Self::TS
Creates transcript with a deterministic initial state.
fn prover_from_transcript( &self, transcript: DuplexSpongeGpu, ) -> Coordinator<SC, Self::PB, Self::PD, Self::TS>
fn params(&self) -> &SystemParams
fn prover(&self) -> Coordinator<Self::SC, Self::PB, Self::PD, Self::TS>
fn keygen( &self, airs: &[Arc<dyn AnyAir<Self::SC>>], ) -> (MultiStarkProvingKey<Self::SC>, MultiStarkVerifyingKey<Self::SC>)
fn prove( &self, pk: &DeviceMultiStarkProvingKey<Self::PB>, ctx: ProvingContext<Self::PB>, ) -> Result<Proof<Self::SC>, <Self::PD as ProverDevice<Self::PB, Self::TS>>::Error>
Source§fn verify(
&self,
vk: &MultiStarkVerifyingKey<Self::SC>,
proof: &Proof<Self::SC>,
) -> Result<(), VerifierError<<Self::SC as StarkProtocolConfig>::EF>>
fn verify( &self, vk: &MultiStarkVerifyingKey<Self::SC>, proof: &Proof<Self::SC>, ) -> Result<(), VerifierError<<Self::SC as StarkProtocolConfig>::EF>>
Verifies using a default instantiation of the Fiat-Shamir transcript.
Source§fn debug(
&self,
airs: &[Arc<dyn AnyAir<Self::SC>>],
ctx: &ProvingContext<Self::PB>,
)
fn debug( &self, airs: &[Arc<dyn AnyAir<Self::SC>>], ctx: &ProvingContext<Self::PB>, )
The indexing of AIR ID in
ctx should be consistent with the order of airs. In
particular, airs should correspond to the global proving key with all AIRs, including ones
not present in the ctx.Source§fn run_test(
&self,
airs: Vec<Arc<dyn AnyAir<Self::SC>>>,
ctxs: Vec<AirProvingContext<Self::PB>>,
) -> Result<VerificationData<Self::SC>, StarkTestError<<Self::PD as ProverDevice<Self::PB, Self::TS>>::Error, <Self::SC as StarkProtocolConfig>::EF>>
fn run_test( &self, airs: Vec<Arc<dyn AnyAir<Self::SC>>>, ctxs: Vec<AirProvingContext<Self::PB>>, ) -> Result<VerificationData<Self::SC>, StarkTestError<<Self::PD as ProverDevice<Self::PB, Self::TS>>::Error, <Self::SC as StarkProtocolConfig>::EF>>
Runs a single end-to-end test for a given set of chips and traces partitions.
This includes proving/verifying key generation, creating a proof, and verifying the proof.
Auto Trait Implementations§
impl<HS> Freeze for GpuEngine<HS>
impl<HS> RefUnwindSafe for GpuEngine<HS>
impl<HS> Send for GpuEngine<HS>
impl<HS> Sync for GpuEngine<HS>
impl<HS> Unpin for GpuEngine<HS>
impl<HS> UnsafeUnpin for GpuEngine<HS>
impl<HS> UnwindSafe for GpuEngine<HS>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more