HardwareOps

Trait HardwareOps 

Source
pub trait HardwareOps {
    // Required methods
    fn matmul_hw(
        &self,
        other: &Tensor,
        device: &HardwareDevice,
    ) -> Result<Tensor>;
    fn conv2d_hw(
        &self,
        kernel: &Tensor,
        device: &HardwareDevice,
    ) -> Result<Tensor>;
    fn elementwise_hw(
        &self,
        op: ElementwiseOp,
        device: &HardwareDevice,
    ) -> Result<Tensor>;
}
Expand description

Hardware-accelerated operations trait

Required Methods§

Source

fn matmul_hw(&self, other: &Tensor, device: &HardwareDevice) -> Result<Tensor>

Matrix multiplication on hardware

Source

fn conv2d_hw(&self, kernel: &Tensor, device: &HardwareDevice) -> Result<Tensor>

Convolution on hardware

Source

fn elementwise_hw( &self, op: ElementwiseOp, device: &HardwareDevice, ) -> Result<Tensor>

Element-wise operations on hardware

Implementors§