diff --git a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td --- a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td +++ b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td @@ -676,17 +676,17 @@ ```mlir func.func @conv_2d(%D : memref<100x100xf32>, %K : memref<3x3xf32>) -> (memref<98x98xf32>) { - %O = alloc memref<98x98xf32> + %O = memref.alloc() : memref<98x98xf32> affine.parallel (%x, %y) = (0, 0) to (98, 98) { - %0 = affine.parallel (%kx, %ky) = (0, 0) to (2, 2) reduce ("addf") { + %0 = affine.parallel (%kx, %ky) = (0, 0) to (2, 2) reduce ("addf") -> f32 { %1 = affine.load %D[%x + %kx, %y + %ky] : memref<100x100xf32> %2 = affine.load %K[%kx, %ky] : memref<3x3xf32> %3 = arith.mulf %1, %2 : f32 affine.yield %3 : f32 } - affine.store %0, O[%x, %y] : memref<98x98xf32> + affine.store %0, %O[%x, %y] : memref<98x98xf32> } - return %O + return %O : memref<98x98xf32> } ```