[Mlir-commits] [mlir] [mlir][linalg] Implement Winograd Conv2D. (PR #94470)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Fri Jun 14 11:37:30 PDT 2024


================
@@ -2737,6 +2737,336 @@ FailureOr<SmallVector<Value>> SoftmaxOp::decomposeOperation(OpBuilder &b) {
   return SmallVector<Value>{result};
 }
 
+//===----------------------------------------------------------------------===//
+// WinogradFilterTransformOp
+//===----------------------------------------------------------------------===//
+SmallVector<Range>
+WinogradFilterTransformOp::getIterationDomain(OpBuilder &builder) {
+  SmallVector<Range> loopBounds(4);
+  Location loc = getLoc();
+  Value zero = builder.create<arith::ConstantIndexOp>(loc, 0);
+  Value one = builder.create<arith::ConstantIndexOp>(loc, 1);
+  auto heightAttr = builder.getI64IntegerAttr(getOutputHeight());
+  auto widthAttr = builder.getI64IntegerAttr(getOutputWidth());
----------------
ftynse wrote:

`getOutputHeightAttr()` will return the attribute without the need to reconstruct it from value locally.

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


More information about the Mlir-commits mailing list