pub struct KernelExecutable {
pub name: String,
pub kernel_source: String,
pub entry_point: String,
pub shape: Shape,
pub dtype: DtypeRepr,
pub runtime_op: Arc<dyn RuntimeOp>,
pub backward_kernel_source: String,
pub backward_entry_point: String,
}Expand description
A lowered op that carries the kernel source needed for compilation.
Callers that have teeny-compiler as a dependency can pass kernel_source
and kernel_entry_point to compile_kernel along with a chosen Target.
Fields§
§name: String§kernel_source: String§entry_point: String§shape: Shape§dtype: DtypeRepr§runtime_op: Arc<dyn RuntimeOp>Runtime dispatch object: how to pack args and compute the launch grid.
Input nodes carry a no-op implementation.
backward_kernel_source: StringBackward kernel source. Empty if this op has no backward.
backward_entry_point: StringBackward kernel entry point name.
Trait Implementations§
Source§impl ExecutableOp for KernelExecutable
impl ExecutableOp for KernelExecutable
Source§fn forward_kernel_source(&self) -> &str
fn forward_kernel_source(&self) -> &str
This op’s forward kernel source.
Source§fn forward_kernel_entry_point(&self) -> &str
fn forward_kernel_entry_point(&self) -> &str
This op’s forward kernel entry-point symbol name.
Source§fn output_shape(&self) -> &Shape
fn output_shape(&self) -> &Shape
This op’s output shape.
Source§fn output_dtype(&self) -> DtypeRepr
fn output_dtype(&self) -> DtypeRepr
This op’s output dtype.
Source§fn 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.Source§fn backward_kernel_source(&self) -> &str
fn backward_kernel_source(&self) -> &str
Returns the backward kernel source, or
"" if no backward is available.Source§fn backward_kernel_entry_point(&self) -> &str
fn backward_kernel_entry_point(&self) -> &str
Returns the backward kernel entry point name.
Auto Trait Implementations§
impl Freeze for KernelExecutable
impl !RefUnwindSafe for KernelExecutable
impl Send for KernelExecutable
impl Sync for KernelExecutable
impl Unpin for KernelExecutable
impl UnsafeUnpin for KernelExecutable
impl !UnwindSafe for KernelExecutable
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