[Mlir-commits] [mlir] [mlir][vector] Add a check to ensure input vector rank equals target shape rank (PR #127706)

Andrzej WarzyƄski llvmlistbot at llvm.org
Mon Feb 24 12:04:46 PST 2025


================
@@ -188,6 +188,15 @@ func.func @vector_fma(%a: vector<4x4xf32>, %b: vector<4x4xf32>, %c: vector<4x4xf
 //   CHECK-LABEL: func @vector_fma
 // CHECK-COUNT-4: vector.fma %{{.+}}, %{{.+}}, %{{.+}} : vector<2x2xf32>
 
+func.func @negative_vector_fma_3d(%a: vector<3x2x2xf32>) {
+  %0 = vector.fma %a, %a, %a : vector<3x2x2xf32>
+  return 
+}
----------------
banach-space wrote:

Right now it's not 100% obvious _why_ this case fails (but we know that it's the usage of 3d vectors that makes it unique). Please add a hint for our future-selves. Something like:
> // TODO: We should be able to unroll this like the example above - this will require extending `UnrollElementwisePattern`.

This way it is clear that the main reason for this to fail is simply missing functionality.

https://github.com/llvm/llvm-project/pull/127706


More information about the Mlir-commits mailing list