[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());
+  Value output = getOutput();
+  for (auto dim = 0; dim < 4; ++dim) {
----------------
ftynse wrote:

Expand `auto` into a proper type unless the RHS is a cast, or the type is too long to spell out.

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


More information about the Mlir-commits mailing list