From 2ea76c09678f092d00713ebbe6fdb046c0a9ad0f Mon Sep 17 00:00:00 2001 From: Mathieu Poumeyrol Date: Sun, 10 Sep 2023 13:38:17 +0200 Subject: [PATCH] fix matmul translation --- hir/src/ops/matmul.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hir/src/ops/matmul.rs b/hir/src/ops/matmul.rs index 0d3d6f2e47..4b947c868c 100644 --- a/hir/src/ops/matmul.rs +++ b/hir/src/ops/matmul.rs @@ -65,7 +65,7 @@ impl Expansion for MatMulInference { } if implicit_n { let b = InOut::In(1); - let n_axis = axes.axis((b, axes.rank(b) - 2))?; + let n_axis = axes.axis((b, axes.rank(b) - 1))?; axes = axes.remove_output_axis(0, n_axis.outputs[0][0])?; } target.wire_node(