pub struct CompiledNode {
pub op: OpKind,
pub dtypes: KernelDTypes,
pub backend: BackendId,
pub kernel: KernelRef,
pub caps: KernelCaps,
pub op_params: OpParams,
pub est_ns: u64,
}Expand description
A graph node plus its resolved kernel function pointer and
op-specific parameters. Produced by compile_node; consumed
by execute_compiled.
Fields§
§op: OpKindThe op family this node implements.
dtypes: KernelDTypesPer-operand dtypes used as the binding-table lookup key.
Inputs in order, then outputs. For uniform-precision ops the
list is [T, T, ..., T]; for mixed-precision ops it carries
the distinguishing combo. The output dtype is always the last
entry.
backend: BackendIdWhich backend’s kernel was selected.
kernel: KernelRefResolved kernel function pointer. Looked up once at compile time; the executor calls this directly.
caps: KernelCapsCapability flags registered alongside the kernel. The executor
consults caps.strided_input to decide whether to skip
auto-Contiguize for non-contiguous inputs.
op_params: OpParamsOp-specific parameters. Most ops use OpParams::None;
reductions / conv / slice carry their config here.
est_ns: u64Estimated cost of ONE launch of this kernel in nanoseconds, built once when the node is compiled
(the binding entry’s static cost through the backend’s throughput prior, the same composite the
route picker ranks arms with). 0 means “no estimate”: a CPU node, or no cost function or
capabilities for its backend. The executor adds it to the device’s backlog when the node is
submitted to a GPU (crate::dispatch::BacklogLedger, ROADMAP row 158); a 0 adds nothing, so a
device the executor cannot price is never reported idle.
Implementations§
Source§impl CompiledNode
impl CompiledNode
Sourcepub fn output_dtype(&self) -> DType
pub fn output_dtype(&self) -> DType
The output dtype — last entry in dtypes. Convenience accessor
for callers that only need the output type (e.g. shape inference,
allocation).
Trait Implementations§
Source§impl Clone for CompiledNode
impl Clone for CompiledNode
Auto Trait Implementations§
impl Forget for CompiledNode
impl Freeze for CompiledNode
impl Move for CompiledNode
impl RefUnwindSafe for CompiledNode
impl Send for CompiledNode
impl Sync for CompiledNode
impl Unpin for CompiledNode
impl UnsafeUnpin for CompiledNode
impl UnwindSafe for CompiledNode
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> 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