Skip to main content

ExecutableOp

Trait ExecutableOp 

Source
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§

Source

fn name(&self) -> &str

This op’s name.

Source

fn forward_kernel_source(&self) -> &str

This op’s forward kernel source.

Source

fn forward_kernel_entry_point(&self) -> &str

This op’s forward kernel entry-point symbol name.

Source

fn output_shape(&self) -> &Shape

This op’s output shape.

Source

fn output_dtype(&self) -> DtypeRepr

This op’s output dtype.

Provided Methods§

Source

fn is_input(&self) -> bool

Returns true for Input placeholder nodes, which carry no kernel.

Source

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

Returns the backward kernel source, or "" if no backward is available.

Source

fn backward_kernel_entry_point(&self) -> &str

Returns the backward kernel entry point name.

Implementors§