#[non_exhaustive]pub struct LoadTimings {
pub tokenizer_load: Duration,
pub token_table_read: Duration,
pub probe: Option<Duration>,
pub parity_check_total: Option<Duration>,
pub parity_cpu_reference: Option<Duration>,
pub parity_accelerator: Option<Duration>,
pub parity_cache: ParityCacheOutcome,
pub session_creates: Vec<SessionCreate>,
pub prewarm: Option<Duration>,
pub prewarm_per_length: Vec<(usize, Duration)>,
pub total: Duration,
}Expand description
Where an E40 load spent its time; see Embedder::load_timings. Phases are wall-clock
durations of the work as Embedder::load ran it; they nest (session_creates happen inside
the probe and the parity check) and do not add up to total exactly.
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.tokenizer_load: DurationReading tokenizer.json.
token_table_read: DurationReading and validating embed_tokens.f16.npy.
probe: Option<Duration>Probe inference on the accelerator (Auto only), including its graph build.
parity_check_total: Option<Duration>The whole parity check, from the cache lookup to the stored verdict. None when no
check ran (CPU provider).
parity_cpu_reference: Option<Duration>Inside the check: CPU reference sessions, tokenizer reload and CPU embeddings. None
on a cache hit.
parity_accelerator: Option<Duration>Inside the check: the accelerator’s embeddings of the parity prompts, including its
graph builds. None on a cache hit.
parity_cache: ParityCacheOutcomeWhat the verdict cache did.
session_creates: Vec<SessionCreate>Every graph built during the load, in build order, on both providers.
prewarm: Option<Duration>Pre-warm after admission (EmbedderConfig::with_prewarm): the graph builds still
missing plus one dummy run per graph. Its graph builds are also in session_creates.
None when no pre-warm ran (disabled, CPU provider, or an accelerator not admitted).
prewarm_per_length: Vec<(usize, Duration)>Core ML only: the pre-warm time of each function as (length in tokens, time), shortest
first. The cpu_and_gpu lengths (256, 512) carry the shader build, up to 51 s cold.
Empty for every other backend and when no pre-warm ran.
total: DurationEmbedder::load from entry to return.
Trait Implementations§
Source§impl Clone for LoadTimings
impl Clone for LoadTimings
Source§impl Debug for LoadTimings
impl Debug for LoadTimings
Source§impl Default for LoadTimings
impl Default for LoadTimings
impl Eq for LoadTimings
Source§impl PartialEq for LoadTimings
impl PartialEq for LoadTimings
impl StructuralPartialEq for LoadTimings
Auto Trait Implementations§
impl Freeze for LoadTimings
impl RefUnwindSafe for LoadTimings
impl Send for LoadTimings
impl Sync for LoadTimings
impl Unpin for LoadTimings
impl UnsafeUnpin for LoadTimings
impl UnwindSafe for LoadTimings
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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