User-facing matrix multiplication type with enhanced error messages
This provides better developer experience by using CanMatmul which gives detailed error messages for incompatible shapes.
First tensor storage
Second tensor storage
type A = TensorStorage<Float32, [2, 3]>;type B = TensorStorage<Float32, [3, 4]>;type Result = Matmul<A, B>; // Output shape: [2, 4] Copy
type A = TensorStorage<Float32, [2, 3]>;type B = TensorStorage<Float32, [3, 4]>;type Result = Matmul<A, B>; // Output shape: [2, 4]
type Vector = TensorStorage<Float32, [5]>;type DotProduct = Matmul<Vector, Vector>; // Output shape: [] (scalar) Copy
type Vector = TensorStorage<Float32, [5]>;type DotProduct = Matmul<Vector, Vector>; // Output shape: [] (scalar)
User-facing matrix multiplication type with enhanced error messages
This provides better developer experience by using CanMatmul which gives detailed error messages for incompatible shapes.