[Mlir-commits] [mlir] [MLIR][Linalg] Pattern to fold AddOp to accumulation via contraction op's dest (PR #110514)
Rolf Morel
llvmlistbot at llvm.org
Wed Oct 2 07:59:45 PDT 2024
================
@@ -38,6 +38,12 @@ namespace linalg {
// General utilities
//===----------------------------------------------------------------------===//
+// Returns true if `val` represents a zero-filled tensor, per its defining op.
+bool isZeroTensor(Value val);
----------------
rolfmorel wrote:
As it has support for tracing a value's definition through `linalg.generic`s, `linalg.fill` and `linalg.copy` it is kind of tied to linalg, I would say. As such I didn't think the code could be moved to StaticValueUtils.cpp (which is pretty much dialect/op agnostic).
https://github.com/llvm/llvm-project/pull/110514
More information about the Mlir-commits
mailing list