pub struct GpuProverConfig { /* private fields */ }Expand description
Low-level configuration for the GPU prover.
The default configuration is meant to be optimal in the vast majority of cases, so overriding it is only recommended if you either have specific constraints or you need to fine-tune the configuration for a specific and unusual workload. Each field left unset keeps the prover’s own default.
Implementations§
Source§impl GpuProverConfig
impl GpuProverConfig
Sourcepub fn with_worker_threads(self, worker_threads: usize) -> Self
pub fn with_worker_threads(self, worker_threads: usize) -> Self
Number of worker threads for the prover’s thread pool and replay workers.
Sourcepub fn maybe_worker_threads(self, worker_threads: Option<usize>) -> Self
pub fn maybe_worker_threads(self, worker_threads: Option<usize>) -> Self
Like Self::with_worker_threads but a no-op when None.
Sourcepub fn with_max_device_memory_bytes(self, bytes: usize) -> Self
pub fn with_max_device_memory_bytes(self, bytes: usize) -> Self
Caps the GPU device allocator at bytes. By default the allocator grabs
all free VRAM, which leaves no room for a co-resident prover in the same
process (e.g. the SNARK wrapper). Capping the FRI prover leaves headroom
for it. A cap at or above the free amount is a no-op.
Sourcepub fn with_host_allocators_per_job(self, count: usize) -> Self
pub fn with_host_allocators_per_job(self, count: usize) -> Self
Pinned host transfer buffers pre-allocated per concurrent job (64 MiB each). Lowering this below the prover default reclaims committed RAM at the cost of less host<->device pipelining.
Sourcepub fn with_host_allocators_per_device(self, count: usize) -> Self
pub fn with_host_allocators_per_device(self, count: usize) -> Self
Pinned host transfer buffers pre-allocated per GPU device (64 MiB each).
See Self::with_host_allocators_per_job.
Trait Implementations§
Source§impl Clone for GpuProverConfig
impl Clone for GpuProverConfig
Source§fn clone(&self) -> GpuProverConfig
fn clone(&self) -> GpuProverConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GpuProverConfig
impl Debug for GpuProverConfig
Source§impl Default for GpuProverConfig
impl Default for GpuProverConfig
Source§fn default() -> GpuProverConfig
fn default() -> GpuProverConfig
impl Copy for GpuProverConfig
Auto Trait Implementations§
impl Freeze for GpuProverConfig
impl RefUnwindSafe for GpuProverConfig
impl Send for GpuProverConfig
impl Sync for GpuProverConfig
impl Unpin for GpuProverConfig
impl UnwindSafe for GpuProverConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CudaVariable<T> for T
impl<T> CudaVariable<T> for T
§impl<T> CudaVariableMut<T> for T
impl<T> CudaVariableMut<T> for T
§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>
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>
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