Skip to main content

matmul_config_for_shapes

Function matmul_config_for_shapes 

Source
pub fn matmul_config_for_shapes(
    op: &'static str,
    lhs_shape: &[usize],
    rhs_shape: &[usize],
) -> Result<DotGeneralConfig>
Expand description

Validate rank-2 matrix multiplication shapes and return its dot-general config.

ยงExamples

use tenferro_tensor::validate::matmul_config_for_shapes;

let config = matmul_config_for_shapes("matmul", &[2, 3], &[3, 4])?;
assert_eq!(config.lhs_contracting_dims, vec![1]);