pub struct PrepareConfig {
pub optimizer: OptimizerConfig,
pub disable_schedule_cache: bool,
/* private fields */
}Expand description
Configuration for prepare()/realize() that bundles optimizer settings
with device resolution (codegen backend selection).
Instead of relying on the SVOD_CPU_BACKEND env var (global mutable state),
the backend is selected per-call via a [DeviceResolver].
Fields§
§optimizer: OptimizerConfig§disable_schedule_cache: boolWhen true, force the cache-cold rangeify/scheduling path even if
SVOD_DISABLE_SCHEDULE_CACHE is unset. Primarily useful in tests
that need to compare cache-warm vs cache-cold outputs without mutating
process-global env state.
Implementations§
Source§impl PrepareConfig
impl PrepareConfig
Sourcepub fn for_cpu_backend(backend: CpuBackend) -> Self
pub fn for_cpu_backend(backend: CpuBackend) -> Self
Convenience constructor: specific CPU backend with optimizer settings
resolved from env (BEAM, SVOD_NOOPT, IGNORE_BEAM_CACHE,
BEAM_*, SVOD_*). Used by the codegen_tests! macro so a single
BEAM=4 cargo test flips every codegen-test target to BEAM
without changing test bodies.
Trait Implementations§
Source§impl Debug for PrepareConfig
impl Debug for PrepareConfig
Source§impl Default for PrepareConfig
impl Default for PrepareConfig
Source§impl From<OptimizerConfig> for PrepareConfig
impl From<OptimizerConfig> for PrepareConfig
Source§fn from(optimizer: OptimizerConfig) -> Self
fn from(optimizer: OptimizerConfig) -> Self
Auto Trait Implementations§
impl Freeze for PrepareConfig
impl !RefUnwindSafe for PrepareConfig
impl Send for PrepareConfig
impl Sync for PrepareConfig
impl Unpin for PrepareConfig
impl UnsafeUnpin for PrepareConfig
impl !UnwindSafe for PrepareConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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