[Mlir-commits] [mlir] [mlir][linalg] Implement Conv2D using Winograd Conv2D algorithm (PR #96181)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Jul 8 09:00:02 PDT 2024


================
@@ -2812,32 +2819,34 @@ LogicalResult WinogradOutputTransformOp::verify() {
   int64_t valueW = valueShape[1];
   int64_t valueTileH = valueShape[2];
   int64_t valueTileW = valueShape[3];
-  auto outputType = cast<ShapedType>(getOutput().getType());
-  ArrayRef<int64_t> outputShape = outputType.getShape();
-  int64_t outputH = outputShape[1];
-  int64_t outputW = outputShape[2];
   int m = getM();
   int r = getR();
   bool leftTransform = valueH != 1;
   bool rightTransform = valueW != 1;
 
-  if (!leftTransform && !rightTransform)
-    return failure();
-
-  if (leftTransform) {
-    if (valueH != m + r - 1)
+  SmallVector<int64_t> expectedOutputShape(4, valueH);
+  if (ShapedType::isDynamic(valueH) || ShapedType::isDynamic(valueTileH)) {
+    expectedOutputShape[1] = -1;
----------------
Max191 wrote:

`ShapedType::kDynamic`

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


More information about the Mlir-commits mailing list