pub trait LayoutMatMulAPI<DA, DB>{
type DC: DimAPI;
// Required method
fn layout_matmul(
la: &Layout<DA>,
lb: &Layout<DB>,
order: TensorIterOrder,
) -> Result<Self>;
}
Required Associated Types§
Required Methods§
Sourcefn layout_matmul(
la: &Layout<DA>,
lb: &Layout<DB>,
order: TensorIterOrder,
) -> Result<Self>
fn layout_matmul( la: &Layout<DA>, lb: &Layout<DB>, order: TensorIterOrder, ) -> Result<Self>
Layout configuration for matmul.
For order,
C
: return c-contig layoutF
: return f-contig layoutA
: c/f-contig if input is contiguous, otherwise return layout based on default tensor order (TensorOrder::default()
)K
:- rule 1 (vector): no effect (order is not of that important);
- rule 7 (tensor-gemm): if input layouts returns the same
permute_index
ingreedy_layout
, then use this order; otherwise use auto order; - rules 2, 3, 4 (gemv/gevm/2d-gemm): the same to
A
; - rules 5, 6 (tensor-gemm): order of the layout with larger dimension.
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.