[Mlir-commits] [mlir] [MLIR][Linalg] Add aggregate ops decomposition pass and softmax decom… (PR #97582)

Adam Siemieniuk llvmlistbot at llvm.org
Wed Jul 3 10:55:16 PDT 2024


================
@@ -2695,7 +2620,7 @@ static Value buildDivOp(OpBuilder &builder, Location loc, Value numerator,
 /// 4. Divide z and l. This gives the N-dimensional softmax.
 ///    softmax = z / l
 ///
-FailureOr<SmallVector<Value>> SoftmaxOp::decomposeOperation(OpBuilder &b) {
+FailureOr<DecompositionResult> SoftmaxOp::decomposeOperation(OpBuilder &b) {
----------------
adam-smnk wrote:

Current logic assumes softmax is at tensor-level and crashes on memref.
Ideally, it should work on both abstractions but for now it could just fail gracefully.

Either way, I'd add a test case on memrefs too.

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


More information about the Mlir-commits mailing list