[Mlir-commits] [mlir] [MLIR] Refactor to create vectorization convOp precondition check (PR #130181)
Han-Chung Wang
llvmlistbot at llvm.org
Tue Mar 11 09:36:36 PDT 2025
================
@@ -1939,6 +1939,129 @@ vectorizeInsertSliceOpPrecondition(tensor::InsertSliceOp sliceOp,
return success();
}
+namespace {
+enum class ConvOperationKind { Conv, Pool };
+} // namespace
+
+static bool isCastOfBlockArgument(Operation *op) {
+ return isa<CastOpInterface>(op) && op->getNumOperands() == 1 &&
+ isa<BlockArgument>(op->getOperand(0));
+}
+
+// Returns true iff it is a valid conv/pooling op.
----------------
hanhanW wrote:
I think the comment needs to be updated. Could be something like `Returns the ConvOperationKind of the op iff .... Otherwise, returns std::nullopt.`
https://github.com/llvm/llvm-project/pull/130181
More information about the Mlir-commits
mailing list