pub struct ProfileJudgeOracle { /* private fields */ }Expand description
JudgeOracle adapter over a ProfileReport. Build once per
report (cache lifecycle in fuel_tensor::judge::cache, which stays
alongside the Judge that produces the report), query per candidate
from the optimizer ranker’s cost composer.
Implementations§
Source§impl ProfileJudgeOracle
impl ProfileJudgeOracle
Sourcepub fn from_report(report: &ProfileReport) -> ProfileJudgeOracle
pub fn from_report(report: &ProfileReport) -> ProfileJudgeOracle
Index every entry of report for exact-match lookup.
Defensive version gate: a report whose version differs from
PROFILE_REPORT_VERSION produces an EMPTY oracle (every
lookup misses → Layer-1 static costs stand). The persisted-load
path already filters stale schemas (ProfileReport::load
returns Ok(None)), but an in-memory report of a foreign
schema must not feed the cost composer either — pre-v2 reports
were ambiguous about which kernel sibling they timed.
Trait Implementations§
Source§impl Clone for ProfileJudgeOracle
impl Clone for ProfileJudgeOracle
Source§fn clone(&self) -> ProfileJudgeOracle
fn clone(&self) -> ProfileJudgeOracle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProfileJudgeOracle
impl Debug for ProfileJudgeOracle
Source§impl Default for ProfileJudgeOracle
impl Default for ProfileJudgeOracle
Source§fn default() -> ProfileJudgeOracle
fn default() -> ProfileJudgeOracle
Returns the “default value” for a type. Read more
Source§impl JudgeOracle for ProfileJudgeOracle
impl JudgeOracle for ProfileJudgeOracle
Source§fn measured_latency_ns(
&self,
op: OpKind,
dtype: DType,
size_class: SizeClass,
backend: BackendId,
kernel_source: &str,
kernel_revision_hash: u64,
) -> Option<u64>
fn measured_latency_ns( &self, op: OpKind, dtype: DType, size_class: SizeClass, backend: BackendId, kernel_source: &str, kernel_revision_hash: u64, ) -> Option<u64>
Median wall-clock latency in nanoseconds for the
(op, dtype, size_class, backend, kernel_source, kernel_revision_hash) cell. Returns None when the cell isn’t
profiled. Callers MUST treat absence as “no measurement” — not
“zero” — so the static estimate stays the fallback. Read moreAuto Trait Implementations§
impl Freeze for ProfileJudgeOracle
impl RefUnwindSafe for ProfileJudgeOracle
impl Send for ProfileJudgeOracle
impl Sync for ProfileJudgeOracle
impl Unpin for ProfileJudgeOracle
impl UnsafeUnpin for ProfileJudgeOracle
impl UnwindSafe for ProfileJudgeOracle
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
Mutably borrows from an owned value. Read more
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
Converts
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> ⓘ
Converts
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