pub trait BgemmBackend<T> {
// Required method
fn bgemm_contiguous_into(
c: &mut ContiguousOperandMut<T>,
a: &ContiguousOperand<T>,
b: &ContiguousOperand<T>,
batch_dims: &[usize],
m: usize,
n: usize,
k: usize,
alpha: T,
beta: T,
) -> Result<()>;
}Expand description
Trait for backends that can execute batched GEMM on contiguous operands.
Implementations are provided by each backend module (faer, blas).
External crates can implement this trait for custom scalar types
(e.g., tropical semiring) and pass the backend to einsum2_with_backend_into.
Required Methods§
Sourcefn bgemm_contiguous_into(
c: &mut ContiguousOperandMut<T>,
a: &ContiguousOperand<T>,
b: &ContiguousOperand<T>,
batch_dims: &[usize],
m: usize,
n: usize,
k: usize,
alpha: T,
beta: T,
) -> Result<()>
fn bgemm_contiguous_into( c: &mut ContiguousOperandMut<T>, a: &ContiguousOperand<T>, b: &ContiguousOperand<T>, batch_dims: &[usize], m: usize, n: usize, k: usize, alpha: T, beta: T, ) -> Result<()>
Execute batched GEMM: C = alpha * A * B + beta * C for each batch.
c: mutable output operand (batch x m x n)a: input operand (batch x m x k)b: input operand (batch x k x n)batch_dims: sizes of the batch dimensionsm,n,k: fused matrix dimensionsalpha,beta: scaling factors
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.