2020-07-31 21:37:35 +08:00
|
|
|
// RUN: onnx-mlir-opt --convert-krnl-to-affine %s -split-input-file | FileCheck %s
|
2020-04-10 23:27:00 +08:00
|
|
|
|
|
|
|
func @test_lower_degenerate_iterate(%arg0: memref<f32>) -> memref<f32> {
|
|
|
|
%0 = alloc() : memref<f32>
|
|
|
|
krnl.iterate() with () {
|
|
|
|
%1 = load %arg0[] : memref<f32>
|
|
|
|
store %1, %0[] : memref<f32>
|
|
|
|
}
|
|
|
|
return %0 : memref<f32>
|
|
|
|
// CHECK-LABEL: test_lower_degenerate_iterate
|
|
|
|
// CHECK-NEXT: [[ALLOC:%.+]] = alloc() : memref<f32>
|
|
|
|
// CHECK-NEXT: [[LOAD:%.+]] = load %{{.*}}[] : memref<f32>
|
|
|
|
// CHECK-NEXT: store [[LOAD]], [[ALLOC]][] : memref<f32>
|
|
|
|
// CHECK-NEXT: return [[ALLOC]] : memref<f32>
|
|
|
|
}
|