pub trait ExecutableOp {
// Required methods
fn name(&self) -> &str;
fn forward_kernel_source(&self) -> &str;
fn forward_kernel_entry_point(&self) -> &str;
fn output_shape(&self) -> &Shape;
fn output_dtype(&self) -> DtypeRepr;
// Provided methods
fn is_input(&self) -> bool { ... }
fn runtime_op(&self) -> Option<Arc<dyn RuntimeOp>> { ... }
fn backward_kernel_source(&self) -> &str { ... }
fn backward_kernel_entry_point(&self) -> &str { ... }
}Expand description
An op that has been lowered to a compilable kernel representation.
Holds enough information for a caller (who has access to teeny-compiler)
to compile the kernel for a given target. Dispatch/execution is deferred.
Required Methods§
Sourcefn forward_kernel_source(&self) -> &str
fn forward_kernel_source(&self) -> &str
This op’s forward kernel source.
Sourcefn forward_kernel_entry_point(&self) -> &str
fn forward_kernel_entry_point(&self) -> &str
This op’s forward kernel entry-point symbol name.
Sourcefn output_shape(&self) -> &Shape
fn output_shape(&self) -> &Shape
This op’s output shape.
Sourcefn output_dtype(&self) -> DtypeRepr
fn output_dtype(&self) -> DtypeRepr
This op’s output dtype.
Provided Methods§
Sourcefn runtime_op(&self) -> Option<Arc<dyn RuntimeOp>>
fn runtime_op(&self) -> Option<Arc<dyn RuntimeOp>>
Returns the runtime dispatch object for this op, or None for Input nodes.
Sourcefn backward_kernel_source(&self) -> &str
fn backward_kernel_source(&self) -> &str
Returns the backward kernel source, or "" if no backward is available.
Sourcefn backward_kernel_entry_point(&self) -> &str
fn backward_kernel_entry_point(&self) -> &str
Returns the backward kernel entry point name.