pub struct Pick {
pub backend: BackendId,
pub device_index: u32,
pub kernel_source: &'static str,
pub kernel_revision_hash: u64,
}Expand description
Where the dispatch table decided an op should run, and which kernel sibling won at that decision point.
Per-alternative measurement (2026-06-08): kernel_source
surfaces the winning ProfileEntry::kernel_source so
consumers (Router, planner, telemetry) can name the actual
kernel — critical when multiple alternatives register at
(BackendId::Cpu) (e.g. AOCL vs MKL vs portable-cpu) and the
(backend, device) pair alone is ambiguous. "" for legacy
reports / single-impl cells.
Pick stays Copy (and &'static str is Copy); the picker
preserves the string identity by reading it directly from the
winning ProfileEntry — its String value is matched against
the well-known interned set via kernel_source_intern so the
&'static str is the same pointer the binding-table entry
carries.
Pick is only ever constructed at runtime by DispatchTable::rebuild_from
from in-memory ProfileEntry data — never deserialized from JSON
or other owned input. We therefore intentionally do NOT derive
Deserialize (the &'static str field can’t be deserialized from
owned input). Serialize is also dropped for symmetry; the public
serialization surface is ProfileReport / ProfileEntry, and
Pick is regenerated by calling DispatchTable::build.
Fields§
§backend: BackendId§device_index: u32§kernel_source: &'static strDiagnostic tag from the winning ProfileEntry::kernel_source.
"" when no sibling distinguishes the cell.
kernel_revision_hash: u64Revision of the winning kernel build, from
ProfileEntry::kernel_revision_hash. Completes the kernel
identity that kernel_source alone (provider-granular) leaves
ambiguous among the variant siblings of one provider. 0 when
untracked. u64 is Copy, so Pick stays Copy.
Trait Implementations§
impl Copy for Pick
impl Eq for Pick
impl StructuralPartialEq for Pick
Auto Trait Implementations§
impl Freeze for Pick
impl RefUnwindSafe for Pick
impl Send for Pick
impl Sync for Pick
impl Unpin for Pick
impl UnsafeUnpin for Pick
impl UnwindSafe for Pick
Blanket Implementations§
impl<T> Boilerplate for T
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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