[Mlir-commits] [mlir] [mlir][spirv] Handle non-innerprod float vector add reductions (PR #73476)

Ivan Butygin llvmlistbot at llvm.org
Mon Nov 27 04:02:10 PST 2023


================
@@ -755,14 +756,39 @@ struct VectorReductionToFPDotProd final
     if (!resultType)
       return rewriter.notifyMatchFailure(op, "result is not a float");
 
-    auto mul = adaptor.getVector().getDefiningOp<arith::MulFOp>();
-    if (!mul)
-      return rewriter.notifyMatchFailure(
-          op, "reduction operand is not 'arith.mulf'");
+    auto vectorType = dyn_cast<VectorType>(adaptor.getVector().getType());
----------------
Hardcode84 wrote:

nit: Can you extract `adaptor.getVector()` and `adaptor.getAcc()` to variables, as they are used multiple times through the code.

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


More information about the Mlir-commits mailing list