pub struct TensixBackend {
pub target: SpatialTarget,
}Fields§
§target: SpatialTargetImplementations§
Source§impl TensixBackend
impl TensixBackend
pub fn new(target: SpatialTarget) -> Self
Sourcepub fn printed_kernels(
&self,
p: &SpatialProgram,
) -> Result<Vec<Kernel>, SpatialLowerError>
pub fn printed_kernels( &self, p: &SpatialProgram, ) -> Result<Vec<Kernel>, SpatialLowerError>
The lowering proper: a pure function of the verified program and the target. Just the kernels — everything the compute engines run, and nothing that needs the HOST.
★ WHY THIS IS A SEPARATE ENTRY POINT. The host program prints a golden, and a golden needs to
reproduce the input data, so print_host refuses a tensor whose fill is External. That is the
right refusal for a runnable bundle and the wrong one for a caller that only wants the kernel:
compile_to_tenstorrent_matmul returns a kernel string, and a GEMM over data the compiler
cannot reproduce still has a perfectly good kernel. Splitting the two means neither has to
weaken for the other.
Sourcepub fn compute_kernel_source(
&self,
p: &SpatialProgram,
) -> Result<String, SpatialLowerError>
pub fn compute_kernel_source( &self, p: &SpatialProgram, ) -> Result<String, SpatialLowerError>
The compute kernel’s source alone — what the kernel-returning compile_to_tenstorrent_* entry
points hand back.
pub fn lower_tensix( &self, p: &SpatialProgram, ) -> Result<TensixArtifact, SpatialLowerError>
Trait Implementations§
Source§impl SpatialBackend for TensixBackend
impl SpatialBackend for TensixBackend
fn name(&self) -> &str
fn target(&self) -> &SpatialTarget
fn lower( &self, p: &SpatialProgram, ) -> Result<SpatialArtifact, SpatialLowerError>
Auto Trait Implementations§
impl Freeze for TensixBackend
impl RefUnwindSafe for TensixBackend
impl Send for TensixBackend
impl Sync for TensixBackend
impl Unpin for TensixBackend
impl UnsafeUnpin for TensixBackend
impl UnwindSafe for TensixBackend
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.