pub struct ProbeReport {
pub params: Vec<ParamValue>,
pub seed: Option<u64>,
pub columns: StatColumns,
pub heap_bytes: u64,
pub population: u64,
pub parallel_jobs: Option<usize>,
pub demand: Option<Demand>,
}Expand description
Stat columns and footprint of one build of a model, sampled at tick 0.
Fields§
§params: Vec<ParamValue>Values of the config the probe built, one per parameter.
seed: Option<u64>Seed the probe built with.
columns: StatColumnsColumns of the sample at tick 0. Every later sample of the sweep must fit them.
heap_bytes: u64Size in bytes of the state on the host.
population: u64Population at tick 0.
parallel_jobs: Option<usize>Number of jobs that one step splits into, None when the backend does not say.
demand: Option<Demand>Device resources of the build, None for a CPU model.
Implementations§
Source§impl ProbeReport
impl ProbeReport
Sourcepub fn build(
entry: &ModelEntry,
gpu: Option<&GpuContext>,
params: &[ParamValue],
seed: Option<u64>,
) -> Result<Self, ProbeError>
pub fn build( entry: &ModelEntry, gpu: Option<&GpuContext>, params: &[ParamValue], seed: Option<u64>, ) -> Result<Self, ProbeError>
Builds entry at params with seed, and samples tick 0 as a run of a sweep does.
§Errors
Returns ProbeError::NoDevice for a GPU model with no device in gpu, and ProbeError::Fault for a
build or a sample that faults.
Sourcepub fn for_plan(
entry: &ModelEntry,
gpu: Option<&GpuContext>,
plan: &Plan,
) -> Result<Self, ProbeError>
pub fn for_plan( entry: &ModelEntry, gpu: Option<&GpuContext>, plan: &Plan, ) -> Result<Self, ProbeError>
Builds the configs of plan in order, each with the seed of its first run, and returns the first report
without a fault.
A config that faults is left for its runs to record. Note that only the first MAX_PROBED_CONFIGS configs
are tried.
§Errors
Returns ProbeError::NoDevice for a GPU model with no device in gpu, and
ProbeError::EveryConfigFaulted when every config tried faults.
Sourcepub fn for_last_config(
entry: &ModelEntry,
gpu: Option<&GpuContext>,
plan: &Plan,
probed: &Self,
) -> Option<Self>
pub fn for_last_config( entry: &ModelEntry, gpu: Option<&GpuContext>, plan: &Plan, probed: &Self, ) -> Option<Self>
Builds the last config of plan with the seed of its first run.
Returns None for a plan of one config or a last config probed already built. Also returns None for a last
config that faults, and leaves the fault for its runs to record.
Sourcepub fn footprint(&self) -> u64
pub fn footprint(&self) -> u64
Memory in bytes that the build holds, on the host and on the device together.
Sourcepub fn rebuilt_on(
&self,
entry: &ModelEntry,
threads: usize,
) -> Result<Self, ProbeError>
pub fn rebuilt_on( &self, entry: &ModelEntry, threads: usize, ) -> Result<Self, ProbeError>
Returns the report of the same CPU build made on a thread pool with threads workers.
Note that a buffer sized to the pool, such as a scatter grid’s scratch, can change the host bytes.
§Errors
Returns ProbeError::Pool when the pool cannot be built, and the error that Self::build returns.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProbeReport
impl RefUnwindSafe for ProbeReport
impl Send for ProbeReport
impl Sync for ProbeReport
impl Unpin for ProbeReport
impl UnsafeUnpin for ProbeReport
impl UnwindSafe for ProbeReport
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> 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