From dfc7299dbb69c1c58b2d5855e019bdcc61dfa7ab Mon Sep 17 00:00:00 2001 From: Evan Smal Date: Tue, 15 Oct 2024 16:36:00 +0000 Subject: [PATCH] #0: Improve matmul error message when inner dimensions do not match --- ttnn/cpp/ttnn/operations/matmul/matmul.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ttnn/cpp/ttnn/operations/matmul/matmul.cpp b/ttnn/cpp/ttnn/operations/matmul/matmul.cpp index aaab35da96b..227ab4af119 100644 --- a/ttnn/cpp/ttnn/operations/matmul/matmul.cpp +++ b/ttnn/cpp/ttnn/operations/matmul/matmul.cpp @@ -58,7 +58,7 @@ ttnn::Tensor bound_matmul( const auto height_b = input_tensor_b_shape[-2]; if (width_a != height_b) { - TT_THROW("ttnn.matmul: The width of the first tensor must be equal to the height of the second tensor"); + TT_THROW("ttnn.matmul: The width of the first tensor must be equal to the height of the second tensor ({} != {}). The shape of first tensor was {} and the shape of second tensor was {})", width_a, height_b, input_tensor_a_shape, input_tensor_b_shape); } const bool has_program_config = parameters.program_config.has_value();