pub struct MatMul;Expand description
Device/configurable intelligent matrix multiplication
- Handles limitation of
acceleratewhich requires f32
Implementations§
Source§impl MatMul
impl MatMul
Sourcepub fn matmul_affine_div(
&self,
a: &Tensor,
b: &Tensor,
scale: f64,
) -> Result<Tensor>
pub fn matmul_affine_div( &self, a: &Tensor, b: &Tensor, scale: f64, ) -> Result<Tensor>
Compute matrix-matrix product.
The result will be divided by the scale parameter in an affine division.
Sourcepub fn matmul_affine_mul(
&self,
a: &Tensor,
b: &Tensor,
scale: f64,
) -> Result<Tensor>
pub fn matmul_affine_mul( &self, a: &Tensor, b: &Tensor, scale: f64, ) -> Result<Tensor>
Compute matrix-matrix product.
The result will be divided by the scale parameter in an affine multiplication.
Sourcepub fn qmatmul(&self, x: &Tensor, matmul: &QMatMul) -> Result<Tensor>
pub fn qmatmul(&self, x: &Tensor, matmul: &QMatMul) -> Result<Tensor>
Compute quantized matrix-matrix product.
Sourcepub fn qmethod_matmul(
&self,
x: &Tensor,
matmul: &dyn QuantMethod,
) -> Result<Tensor>
pub fn qmethod_matmul( &self, x: &Tensor, matmul: &dyn QuantMethod, ) -> Result<Tensor>
Compute quantized matrix-matrix product.
Auto Trait Implementations§
impl Freeze for MatMul
impl RefUnwindSafe for MatMul
impl Send for MatMul
impl Sync for MatMul
impl Unpin for MatMul
impl UnwindSafe for MatMul
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more