#[non_exhaustive]pub struct SweepOptions {
pub concurrency: Concurrency,
pub memory_budget: Option<u64>,
pub gpu_memory_budget: Option<u64>,
pub control: SweepControl,
pub shard: Shard,
pub resume: bool,
pub retry_failed: bool,
pub spec_source: SpecSource,
pub provenance: Provenance,
/* private fields */
}Expand description
Settings of a sweep that never change its results.
Self::new returns the defaults, and a caller sets the other fields by assignment. A spec file’s [execution]
table goes in through Self::apply_execution, before the caller’s own settings.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.concurrency: ConcurrencyNumber of runs stepped at once, as CPU lanes or GPU tracks.
memory_budget: Option<u64>Host memory budget in bytes for all live runs together, None for no limit. The lanes are sized from the probed
run, and a probed run larger than the budget leaves one lane.
gpu_memory_budget: Option<u64>Device memory budget in bytes for all live GPU runs together, None for the device’s largest buffer. A run
larger than the budget runs alone.
control: SweepControlSwitch that pauses or aborts the sweep from another thread.
shard: ShardShare of the plan’s runs that this sweep executes.
resume: boolWhether to add to a directory that holds runs of the same plan, running only the runs it lacks.
A directory that holds no results starts afresh, and so does a sweep held in memory.
retry_failed: boolWhether a resume reruns the runs that ended on a fault. A run that timed out always runs again.
Note that a sweep held in memory resumes nothing, so no run runs again.
spec_source: SpecSourceSpec file the sweep was read from, for the manifest.
provenance: ProvenanceBuild of the host and its command line, for the manifest.
Implementations§
Source§impl SweepOptions
impl SweepOptions
Sourcepub fn new(provenance: Provenance) -> Self
pub fn new(provenance: Provenance) -> Self
Returns the options at their defaults, recording provenance in every manifest the sweep writes.
Sourcepub fn apply_execution(&mut self, execution: &ExecutionTable)
pub fn apply_execution(&mut self, execution: &ExecutionTable)
Copies the concurrency and memory settings of a spec’s [execution] table into the options.
Note that this overwrites all three. A caller with its own settings applies the table first and those settings after it.
Trait Implementations§
Source§impl Clone for SweepOptions
impl Clone for SweepOptions
Auto Trait Implementations§
impl Freeze for SweepOptions
impl RefUnwindSafe for SweepOptions
impl Send for SweepOptions
impl Sync for SweepOptions
impl Unpin for SweepOptions
impl UnsafeUnpin for SweepOptions
impl UnwindSafe for SweepOptions
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,
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