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]);§Errors
Returns crate::Error::Validation with RankMismatch for a non-matrix
input or ShapeMismatch when the contracting dimensions differ.