[Mlir-commits] [mlir] [MLIR][Linalg] Generic to category specialization for unary elementwise ops (PR #187217)
Adam Siemieniuk
llvmlistbot at llvm.org
Wed Mar 18 03:21:44 PDT 2026
================
@@ -35,14 +35,23 @@ namespace mlir {
genericOp.getDpsInputs()[(OPERANDS_SWAP) ? 0 : 1]}, \
ValueRange{genericOp.getDpsInits()[0]}))
-#define REPLACE_UNARY_OP(NEWOP) \
- static_cast<LinalgOp>(rewriter.replaceOpWithNewOp<NEWOP>( \
- genericOp, ValueRange{genericOp.getDpsInputs()[0]}, \
- ValueRange{genericOp.getDpsInits()[0]}))
+#define REPLACE_UNARY_OP(NEWOP, NEWKIND) \
+ static_cast<LinalgOp>( \
+ emitCategoryOp \
----------------
adam-smnk wrote:
Growing complexity and new magic variable indicate it's time to level up this macro to proper templated solution.
https://github.com/llvm/llvm-project/pull/187217
More information about the Mlir-commits
mailing list