[Mlir-commits] [mlir] [MLIR] [Vector] ConstantFold MultiDReduction (PR #122450)
Iman Hosseini
llvmlistbot at llvm.org
Thu Jan 16 11:38:48 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,
+ CombiningKind kind,
+ ShapedType dstType);
+// TODO: move to APFloat, APInt headers.
----------------
ImanHosseini wrote:
https://github.com/llvm/llvm-project/pull/122889#pullrequestreview-2557068452
https://github.com/llvm/llvm-project/pull/122450
More information about the Mlir-commits
mailing list