Skip to content

Commit 25ddaaf

Browse files
ljfitzAlexandreEichenbergergongsu832
authored
Update llvm to 2c8a77a (llvm#1132)
* bump llvm-project to 881ff4e Signed-off-by: Liam Fitzpatrick <[email protected]> Co-authored-by: Alexandre Eichenberger <[email protected]> Co-authored-by: gongsu832 <[email protected]>
1 parent 1cf1392 commit 25ddaaf

25 files changed

+504
-490
lines changed

docs/BuildOnLinuxOSX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Firstly, install MLIR (as a part of LLVM-Project):
1414
``` bash
1515
git clone https://github.com/llvm/llvm-project.git
1616
# Check out a specific branch that is known to work with ONNX-MLIR.
17-
cd llvm-project && git checkout 676bfb2a226e705d801016bb433b68a1e09a1e10 && cd ..
17+
cd llvm-project && git checkout 2c8a77ab21ff3a41829a5d67e0b838cc7a9f5f21 && cd ..
1818
```
1919

2020
[same-as-file]: <> (utils/build-mlir.sh)

docs/BuildOnWindows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Install MLIR (as a part of LLVM-Project):
4848
```shell
4949
git clone https://github.com/llvm/llvm-project.git
5050
# Check out a specific branch that is known to work with ONNX-MLIR.
51-
cd llvm-project && git checkout 676bfb2a226e705d801016bb433b68a1e09a1e10 && cd ..
51+
cd llvm-project && git checkout 2c8a77ab21ff3a41829a5d67e0b838cc7a9f5f21 && cd ..
5252
```
5353

5454
[same-as-file]: <> (utils/build-mlir.cmd)

src/Builder/FrontendDialectTransformer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,9 @@ class FrontendGenImpl {
461461
AddValueInfo(internal);
462462
}
463463

464-
entryBlock->addArguments(argTypes);
464+
entryBlock->addArguments(argTypes,
465+
llvm::SmallVector<Location, 4>(argTypes.size(), UnknownLoc()));
466+
465467
// Map graph inputs to entry block arguments.
466468
// Counter of un-initialized tensors. This counter is used to index the
467469
// entry block arguments.

src/Compiler/CompilerUtils.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "mlir/Target/LLVMIR/Export.h"
2121
#include "llvm/IR/DataLayout.h"
2222
#include "llvm/MC/TargetRegistry.h"
23+
#include "llvm/Support/Path.h"
2324
#include "llvm/Support/Program.h"
2425
#include "llvm/Support/SourceMgr.h"
2526
#include "llvm/Support/TargetSelect.h"

src/Conversion/KrnlToAffine/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ add_onnx_mlir_library(OMKrnlToAffine
88
OMONNXOps
99
OMSupport
1010
MLIRTransforms
11+
MLIRAffineUtils
12+
MLIRVector
1113
)

src/Conversion/KrnlToAffine/KrnlToAffine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
#include "mlir/Dialect/Affine/IR/AffineOps.h"
16+
#include "mlir/Dialect/Affine/LoopUtils.h"
1617
#include "mlir/Dialect/StandardOps/IR/Ops.h"
1718
#include "mlir/Dialect/Vector/VectorOps.h"
1819
#include "mlir/IR/BuiltinTypes.h"
@@ -21,7 +22,6 @@
2122
#include "mlir/Interfaces/LoopLikeInterface.h"
2223
#include "mlir/Pass/Pass.h"
2324
#include "mlir/Transforms/DialectConversion.h"
24-
#include "mlir/Transforms/LoopUtils.h"
2525

2626
#include "src/Conversion/ONNXToKrnl/ONNXToKrnlCommon.hpp"
2727
#include "src/Dialect/Krnl/KrnlOps.hpp"

src/Conversion/KrnlToLLVM/KrnlToLLVM.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@ class KrnlEntryPointOpLowering : public OpRewritePattern<KrnlEntryPointOp> {
12031203
auto dynamicEntryPointFunc = rewriter.create<LLVM::LLVMFuncOp>(
12041204
loc, dynEntryPointName.str(), dynEntryPointFuncTy);
12051205
auto &entryPointEntryBlock =
1206-
createEntryBlock(dynEntryPointFuncTy, dynamicEntryPointFunc);
1206+
createEntryBlock(dynEntryPointFuncTy, dynamicEntryPointFunc, loc);
12071207
rewriter.setInsertionPointToStart(&entryPointEntryBlock);
12081208

12091209
// Based on the static entry point type signature, unpack dynamic memory
@@ -1423,16 +1423,18 @@ class KrnlEntryPointOpLowering : public OpRewritePattern<KrnlEntryPointOp> {
14231423

14241424
// Helper function to insert an entry block to LLVM function.
14251425
// (TODO): upstream this to MLIR.
1426-
Block &createEntryBlock(
1427-
Type &dynEntryPoint, LLVM::LLVMFuncOp &dynamicEntryPointFunc) const {
1426+
Block &createEntryBlock(Type &dynEntryPoint,
1427+
LLVM::LLVMFuncOp &dynamicEntryPointFunc, Location &loc) const {
14281428
// Add entry block:
14291429
auto *entryPointEntryBlock = new Block();
14301430
auto dynEntryPointFuncType = dynEntryPoint.cast<LLVM::LLVMFunctionType>();
14311431
dynamicEntryPointFunc.push_back(entryPointEntryBlock);
14321432
llvm::SmallVector<Type, 4> argTypes;
14331433
for (size_t i = 0; i < dynEntryPointFuncType.getNumParams(); i++)
14341434
argTypes.emplace_back(dynEntryPointFuncType.getParamType(i));
1435-
entryPointEntryBlock->addArguments(argTypes);
1435+
auto argLocs = llvm::SmallVector<Location, 4>(
1436+
dynEntryPointFuncType.getNumParams(), loc);
1437+
entryPointEntryBlock->addArguments(argTypes, argLocs);
14361438
return *entryPointEntryBlock;
14371439
}
14381440

src/Conversion/ONNXToKrnl/ConvertONNXToKrnl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ void populateONNXToKrnlConversionPattern(RewritePatternSet &patterns,
4848
// Type conversion for function signatures.
4949
// Call MLIR FuncOp signature conversion when result type is
5050
// a ranked tensor.
51-
populateFunctionLikeTypeConversionPattern<FuncOp>(patterns, typeConverter);
51+
populateFunctionOpInterfaceTypeConversionPattern<FuncOp>(
52+
patterns, typeConverter);
5253
populateCallOpTypeConversionPattern(patterns, typeConverter);
5354
populateReturnOpTypeConversionPattern(patterns, typeConverter);
5455

src/Conversion/ONNXToKrnl/PerfectHash.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
//
99
// =============================================================================
1010
//
11-
// This file contains the inplementation of a perfect hash table.
11+
// This file contains the implementation of a perfect hash table.
1212
//
1313
//===----------------------------------------------------------------------===//
1414

1515
#include "src/Conversion/ONNXToKrnl/PerfectHash.hpp"
16+
#include "llvm/ADT/STLExtras.h"
1617
#include "llvm/ADT/StringRef.h"
1718
#include "llvm/Support/Debug.h"
1819
#include "llvm/Support/raw_ostream.h"

src/Dialect/Krnl/KrnlOps.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ void KrnlIterateOp::build(OpBuilder &builder, OperationState &result,
151151
auto *body = new Block();
152152
auto body_args = llvm::SmallVector<Type, 4>(
153153
operandPack.getNumInputLoops(), IndexType::get(builder.getContext()));
154-
body->addArguments(body_args);
154+
auto body_arg_locs = llvm::SmallVector<Location, 4>(
155+
operandPack.getNumInputLoops(), result.location);
156+
body->addArguments(body_args, body_arg_locs);
155157
bodyRegion->push_back(body);
156158

157159
// If nonnull, invoke the lambda function that creates the loop body. This

src/Tool/ONNXMLIROpt/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ add_onnx_mlir_executable(onnx-mlir-opt
99
${OMLibs}
1010
MLIRAffineTransforms
1111
MLIRLinalgTransforms
12+
MLIRMemRefTransforms
1213
MLIROptLib
1314
)

src/Tool/ONNXMLIROpt/ONNXMLIROpt.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <llvm/Support/InitLLVM.h>
1717
#include <llvm/Support/MemoryBuffer.h>
1818
#include <llvm/Support/ToolOutputFile.h>
19+
#include <mlir/Dialect/MemRef/Transforms/Passes.h>
1920
#include <mlir/IR/AsmState.h>
2021
#include <mlir/IR/Dialect.h>
2122
#include <mlir/IR/MLIRContext.h>
@@ -106,6 +107,7 @@ int main(int argc, char **argv) {
106107
registerTransformsPasses();
107108
registerAffinePasses();
108109
registerLinalgPasses();
110+
memref::registerMemRefPasses();
109111
registerSCFPasses();
110112
registerStandardPasses();
111113

test/mlir/krnl/ops.mlir

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,31 @@
1313
func @simple_iterate(%N : index) {
1414
%ii, %ij, %ik = krnl.define_loops 3
1515

16-
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) ( {
16+
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) ({
1717
// GENERIC-NEXT: ^bb0(%{{.*}}: index, %{{.*}}: index):
1818
// GENERIC-NEXT: "krnl.terminate"() : () -> ()
1919
// GENERIC-NEXT: bounds = [#{{.*}}, #{{.*}}, #{{.*}}, #{{.*}}]
2020

21-
// CHECK: krnl.iterate(%{{.*}}, %{{.*}}) with (%{{.*}} -> %{{.*}} = 0 to 10, %{{.*}} -> %{{.*}} = 1 to 11) {
21+
// CHECK: krnl.iterate(%{{.*}}, %{{.*}}) with (%{{.*}} -> %{{.*}} = 0 to 10, %{{.*}} -> %{{.*}} = 1 to 11){
2222
krnl.iterate(%ii, %ij) with (%ii -> %i = 0 to 10, %ij -> %j = 1 to 11) {
2323

2424
}
2525

26-
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) ( {
26+
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) ({
2727
// GENERIC-NEXT: ^bb0(%{{.*}}: index, %{{.*}}: index):
28-
// CHECK: krnl.iterate(%{{.*}}, %{{.*}}) with (%{{.*}} -> %{{.*}} = 0 to 10, %{{.*}} -> %{{.*}} = 0 to 10) {
28+
// CHECK: krnl.iterate(%{{.*}}, %{{.*}}) with (%{{.*}} -> %{{.*}} = 0 to 10, %{{.*}} -> %{{.*}} = 0 to 10){
2929
krnl.iterate(%ii, %ij) with (%ii -> %i = 0 to 10, %ij -> %j = 0 to 10) {
30-
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}) ( {
30+
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}) ({
3131
// GENERIC-NEXT: ^bb0(%{{.*}}: index):
32-
// CHECK: krnl.iterate(%{{.*}}) with (%{{.*}} -> %{{.*}} = 0 to 10) {
32+
// CHECK: krnl.iterate(%{{.*}}) with (%{{.*}} -> %{{.*}} = 0 to 10){
3333
krnl.iterate(%ik) with (%ik -> %k = 0 to 10) {
3434

3535
}
3636
}
3737

38-
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) ( {
38+
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) ({
3939
// GENERIC-NEXT: ^bb0(%{{.*}}: index, %{{.*}}: index):
40-
// CHECK: krnl.iterate(%{{.*}}, %{{.*}}) with (%{{.*}} -> %{{.*}} = 0 to %{{.*}}, %{{.*}} -> %{{.*}} = 0 to 10) {
40+
// CHECK: krnl.iterate(%{{.*}}, %{{.*}}) with (%{{.*}} -> %{{.*}} = 0 to %{{.*}}, %{{.*}} -> %{{.*}} = 0 to 10){
4141
krnl.iterate(%ii, %ij) with (%ii -> %i = 0 to %N, %ij -> %j = 0 to 10) {
4242

4343
}
@@ -50,20 +50,20 @@ func @simple_iterate(%N : index) {
5050
func @affine_map_bound(%N : index) {
5151
%ii, %ij, %ik = krnl.define_loops 3
5252

53-
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) ( {
53+
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) ({
5454
// GENERIC-NEXT: ^bb0(%{{.*}}: index, %{{.*}}: index):
55-
// CHECK: krnl.iterate(%{{.*}}, %{{.*}}) with (%{{.*}} -> %{{.*}} = 0 to 10, %{{.*}} -> %{{.*}} = 0 to 10) {
55+
// CHECK: krnl.iterate(%{{.*}}, %{{.*}}) with (%{{.*}} -> %{{.*}} = 0 to 10, %{{.*}} -> %{{.*}} = 0 to 10){
5656
krnl.iterate(%ii, %ij) with (%ii -> %i = affine_map<()->(0)>() to affine_map<()->(10)>(), %ij -> %j = 0 to 10) {
57-
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) ( {
57+
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) ({
5858
// GENERIC-NEXT: ^bb0(%{{.*}}: index):
59-
// CHECK: krnl.iterate(%{{.*}}) with (%{{.*}} -> %{{.*}} = #{{.*}}(%{{.*}}, %{{.*}}) to #{{.*}}(%{{.*}}, %{{.*}})) {
59+
// CHECK: krnl.iterate(%{{.*}}) with (%{{.*}} -> %{{.*}} = #{{.*}}(%{{.*}}, %{{.*}}) to #{{.*}}(%{{.*}}, %{{.*}})){
6060
krnl.iterate(%ik) with (%ik -> %k = affine_map<(d0, d1)->(d0 - d1)>(%i, %j) to affine_map<(d0, d1)->(d0 + d1)>(%i, %j)) {
6161

6262
}
6363

64-
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) ( {
64+
// GENERIC: "krnl.iterate"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) ({
6565
// GENERIC-NEXT: ^bb0(%{{.*}}: index):
66-
// CHECK: krnl.iterate(%{{.*}}) with (%{{.*}} -> %{{.*}} = max #map{{.*}}(%{{.*}}, %{{.*}}) to min #map{{.*}}(%{{.*}}, %{{.*}})[%{{.*}}]) {
66+
// CHECK: krnl.iterate(%{{.*}}) with (%{{.*}} -> %{{.*}} = max #map{{.*}}(%{{.*}}, %{{.*}}) to min #map{{.*}}(%{{.*}}, %{{.*}})[%{{.*}}]){
6767
krnl.iterate(%ik) with (%ik -> %k = max affine_map<(d0, d1)->(d0 - d1, 0)>(%i, %j) to min affine_map<(d0, d1)[s0]->(d0 + d1, s0)>(%i, %j)[%N]) {
6868

6969
}

test/mlir/onnx/onnx_enable_memory_pool.mlir

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ func @test_enable_memory_pool(%arg0: memref<10x10xf32>) -> memref<10x10xf32> {
2929
// CHECK-NOT: separator of consecutive DAGs
3030
// CHECK-DAG: [[VAR_2_:%.+]] = "krnl.getref"([[RES_1_]], [[CST_0_]]) : (memref<400xi8>, i64) -> memref<10x10xf32>
3131
// CHECK-DAG: [[LOOP_0_:%.+]]:2 = krnl.define_loops 2
32-
// CHECK: krnl.iterate([[LOOP_0_]]#0, [[LOOP_0_]]#1) with ([[LOOP_0_]]#0 -> [[I_0_:%.+]] = 0 to 10, [[LOOP_0_]]#1 -> [[I_1_:%.+]] = 0 to 10) {
32+
// CHECK: krnl.iterate([[LOOP_0_]]#0, [[LOOP_0_]]#1) with ([[LOOP_0_]]#0 -> [[I_0_:%.+]] = 0 to 10, [[LOOP_0_]]#1 -> [[I_1_:%.+]] = 0 to 10){
3333
// CHECK-DAG: [[LOAD_PARAM_0_MEM_:%.+]] = krnl.load [[PARAM_0_]]{{.}}[[I_0_]], [[I_1_]]{{.}} : memref<10x10xf32>
3434
// CHECK-DAG: [[LOAD_PARAM_0_MEM_1_:%.+]] = krnl.load [[PARAM_0_]]{{.}}[[I_0_]], [[I_1_]]{{.}} : memref<10x10xf32>
3535
// CHECK: [[VAR_7_:%.+]] = arith.addf [[LOAD_PARAM_0_MEM_]], [[LOAD_PARAM_0_MEM_1_]] : f32
3636
// CHECK: krnl.store [[VAR_7_]], [[VAR_2_]]{{.}}[[I_0_]], [[I_1_]]{{.}} : memref<10x10xf32>
3737
// CHECK: }
3838
// CHECK: [[LOOP_1_:%.+]]:2 = krnl.define_loops 2
39-
// CHECK: krnl.iterate([[LOOP_1_]]#0, [[LOOP_1_]]#1) with ([[LOOP_1_]]#0 -> [[I_2_:%.+]] = 0 to 10, [[LOOP_1_]]#1 -> [[I_3_:%.+]] = 0 to 10) {
39+
// CHECK: krnl.iterate([[LOOP_1_]]#0, [[LOOP_1_]]#1) with ([[LOOP_1_]]#0 -> [[I_2_:%.+]] = 0 to 10, [[LOOP_1_]]#1 -> [[I_3_:%.+]] = 0 to 10){
4040
// CHECK-DAG: [[LOAD_PARAM_0_MEM_2_:%.+]] = krnl.load [[VAR_2_]]{{.}}[[I_2_]], [[I_3_]]{{.}} : memref<10x10xf32>
4141
// CHECK-DAG: [[LOAD_PARAM_0_MEM_3_:%.+]] = krnl.load [[PARAM_0_]]{{.}}[[I_2_]], [[I_3_]]{{.}} : memref<10x10xf32>
4242
// CHECK: [[VAR_7_1_:%.+]] = arith.addf [[LOAD_PARAM_0_MEM_2_]], [[LOAD_PARAM_0_MEM_3_]] : f32
@@ -101,18 +101,18 @@ func @test_enable_memory_pool_2(%arg0: memref<10x10xf32>, %arg1: memref<10x20xf3
101101
// CHECK-NOT: separator of consecutive DAGs
102102
// CHECK-DAG: [[VAR_4_:%.+]] = "krnl.getref"([[RES_2_]], [[CST_0_]]) : (memref<400xi8>, i64) -> memref<10x10xf32>
103103
// CHECK-DAG: [[LOOP_0_:%.+]]:2 = krnl.define_loops 2
104-
// CHECK: krnl.iterate([[LOOP_0_]]#0, [[LOOP_0_]]#1) with ([[LOOP_0_]]#0 -> [[I_0_:%.+]] = 0 to 10, [[LOOP_0_]]#1 -> [[I_1_:%.+]] = 0 to 10) {
104+
// CHECK: krnl.iterate([[LOOP_0_]]#0, [[LOOP_0_]]#1) with ([[LOOP_0_]]#0 -> [[I_0_:%.+]] = 0 to 10, [[LOOP_0_]]#1 -> [[I_1_:%.+]] = 0 to 10){
105105
// CHECK-DAG: [[LOAD_PARAM_0_MEM_:%.+]] = krnl.load [[PARAM_0_]]{{.}}[[I_0_]], [[I_1_]]{{.}} : memref<10x10xf32>
106106
// CHECK-DAG: [[LOAD_PARAM_0_MEM_1_:%.+]] = krnl.load [[PARAM_0_]]{{.}}[[I_0_]], [[I_1_]]{{.}} : memref<10x10xf32>
107107
// CHECK: [[VAR_10_:%.+]] = arith.addf [[LOAD_PARAM_0_MEM_]], [[LOAD_PARAM_0_MEM_1_]] : f32
108108
// CHECK: krnl.store [[VAR_10_]], [[VAR_4_]]{{.}}[[I_0_]], [[I_1_]]{{.}} : memref<10x10xf32>
109109
// CHECK: }
110110
// CHECK: [[LOOP_1_:%.+]]:2 = krnl.define_loops 2
111-
// CHECK: krnl.iterate([[LOOP_1_]]#0, [[LOOP_1_]]#1) with ([[LOOP_1_]]#0 -> [[I_2_:%.+]] = 0 to 10, [[LOOP_1_]]#1 -> [[I_3_:%.+]] = 0 to 20) {
111+
// CHECK: krnl.iterate([[LOOP_1_]]#0, [[LOOP_1_]]#1) with ([[LOOP_1_]]#0 -> [[I_2_:%.+]] = 0 to 10, [[LOOP_1_]]#1 -> [[I_3_:%.+]] = 0 to 20){
112112
// CHECK: [[RES_3_:%.+]] = memref.alloca() : memref<f32>
113113
// CHECK: krnl.store [[CST_0_dot_000000_]], [[RES_3_]][] : memref<f32>
114114
// CHECK: [[LOOP_2_:%.+]] = krnl.define_loops 1
115-
// CHECK: krnl.iterate([[LOOP_2_]]) with ([[LOOP_2_]] -> [[I_4_:%.+]] = 0 to 10) {
115+
// CHECK: krnl.iterate([[LOOP_2_]]) with ([[LOOP_2_]] -> [[I_4_:%.+]] = 0 to 10){
116116
// CHECK-DAG: [[LOAD_VAR_4_MEM_:%.+]] = krnl.load [[VAR_4_]]{{.}}[[I_2_]], [[I_4_]]{{.}} : memref<10x10xf32>
117117
// CHECK-DAG: [[LOAD_PARAM_1_MEM_:%.+]] = krnl.load [[PARAM_1_]]{{.}}[[I_4_]], [[I_3_]]{{.}} : memref<10x20xf32>
118118
// CHECK-DAG: [[LOAD_RES_3_MEM_:%.+]] = krnl.load [[RES_3_]][] : memref<f32>
@@ -124,7 +124,7 @@ func @test_enable_memory_pool_2(%arg0: memref<10x10xf32>, %arg1: memref<10x20xf3
124124
// CHECK: krnl.store [[LOAD_RES_3_MEM_1_]], [[VAR_2_]]{{.}}[[I_2_]], [[I_3_]]{{.}} : memref<10x20xf32>
125125
// CHECK: }
126126
// CHECK: [[LOOP_3_:%.+]]:2 = krnl.define_loops 2
127-
// CHECK: krnl.iterate([[LOOP_3_]]#0, [[LOOP_3_]]#1) with ([[LOOP_3_]]#0 -> [[I_5_:%.+]] = 0 to 10, [[LOOP_3_]]#1 -> [[I_6_:%.+]] = 0 to 20) {
127+
// CHECK: krnl.iterate([[LOOP_3_]]#0, [[LOOP_3_]]#1) with ([[LOOP_3_]]#0 -> [[I_5_:%.+]] = 0 to 10, [[LOOP_3_]]#1 -> [[I_6_:%.+]] = 0 to 20){
128128
// CHECK-DAG: [[RES_3_:%.+]] = krnl.load [[VAR_2_]]{{.}}[[I_5_]], [[I_6_]]{{.}} : memref<10x20xf32>
129129
// CHECK-DAG: [[LOAD_PARAM_1_MEM_1_:%.+]] = krnl.load [[PARAM_1_]]{{.}}[[I_5_]], [[I_6_]]{{.}} : memref<10x20xf32>
130130
// CHECK: [[VAR_10_1_:%.+]] = arith.addf [[RES_3_]], [[LOAD_PARAM_1_MEM_1_]] : f32

0 commit comments

Comments
 (0)