[Mlir-commits] [mlir] [MLIR] [Vector] ConstantFold MultiDReduction (PR #122450)

Diego Caballero llvmlistbot at llvm.org
Mon Jan 13 11:34:39 PST 2025


================
@@ -463,10 +462,157 @@ void vector::MultiDimReductionOp::build(OpBuilder &builder,
   build(builder, result, kind, source, acc, reductionDims);
 }
 
+/// Computes the result of reducing a constant vector where the accumulator
+/// value, `acc`, is also constant.
+template <typename T>
+static OpFoldResult computeConstantReduction(T src, T acc, int64_t times,
----------------
dcaballe wrote:

Can we document `times`?

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


More information about the Mlir-commits mailing list