Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dialects: Add stencil features meant for bufferization #2985

Merged
merged 14 commits into from
Aug 5, 2024
Merged
2 changes: 1 addition & 1 deletion tests/filecheck/dialects/csl/csl-stencil-ops.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ builtin.module {
// CHECK-GENERIC-NEXT: ^0(%a : !stencil.field<[-1,1023]x[-1,511]xtensor<512xf32>>, %b : !stencil.field<[-1,1023]x[-1,511]xtensor<512xf32>>):
// CHECK-GENERIC-NEXT: %0 = "stencil.load"(%a) : (!stencil.field<[-1,1023]x[-1,511]xtensor<512xf32>>) -> !stencil.temp<[-1,2]x[-1,2]xtensor<512xf32>>
// CHECK-GENERIC-NEXT: %pref = "csl_stencil.prefetch"(%0) <{"topo" = #dmp.topo<1022x510>, "swaps" = [#csl_stencil.exchange<to [1, 0]>, #csl_stencil.exchange<to [-1, 0]>, #csl_stencil.exchange<to [0, 1]>, #csl_stencil.exchange<to [0, -1]>]}> : (!stencil.temp<[-1,2]x[-1,2]xtensor<512xf32>>) -> tensor<4x510xf32>
// CHECK-GENERIC-NEXT: %1 = "stencil.apply"(%0, %pref) ({
// CHECK-GENERIC-NEXT: %1 = "stencil.apply"(%0, %pref) <{"operandSegmentSizes" = array<i32: 2, 0>}> ({
// CHECK-GENERIC-NEXT: ^1(%2 : !stencil.temp<[-1,2]x[-1,2]xtensor<512xf32>>, %3 : tensor<4x510xf32>):
// CHECK-GENERIC-NEXT: %4 = "arith.constant"() <{"value" = 1.666600e-01 : f32}> : () -> f32
// CHECK-GENERIC-NEXT: %5 = "csl_stencil.access"(%3) <{"offset" = #stencil.index<[1, 0]>, "offset_mapping" = #stencil.index<[0, 1]>}> : (tensor<4x510xf32>) -> tensor<510xf32>
Expand Down
18 changes: 9 additions & 9 deletions tests/filecheck/dialects/stencil/invalid.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ builtin.module {
builtin.module {
func.func @buffered_and_stored_1d(%in : !stencil.field<[-4,68]xf64>, %out : !stencil.field<[0,1024]xf64>) {
%int = "stencil.load"(%in) : (!stencil.field<[-4,68]xf64>) -> !stencil.temp<[-1,68]xf64>
%outt = "stencil.apply"(%int) ({
%outt = "stencil.apply"(%int) <{"operandSegmentSizes" = array<i32: 1, 0>}> ({
^0(%intb : !stencil.temp<[-1,68]xf64>):
%v = "stencil.access"(%intb) {"offset" = #stencil.index<[-1]>} : (!stencil.temp<[-1,68]xf64>) -> f64
"stencil.return"(%v) : (f64) -> ()
Expand All @@ -31,7 +31,7 @@ builtin.module {
builtin.module {
func.func @buffer_types_mismatch_1d(%in : !stencil.field<[-4,68]xf64>, %out : !stencil.field<[0,1024]xf64>) {
%int = "stencil.load"(%in) : (!stencil.field<[-4,68]xf64>) -> !stencil.temp<[-1,68]xf64>
%outt = "stencil.apply"(%int) ({
%outt = "stencil.apply"(%int) <{"operandSegmentSizes" = array<i32: 1, 0>}> ({
^0(%intb : !stencil.temp<[-1,68]xf64>):
%v = "stencil.access"(%intb) {"offset" = #stencil.index<[-1]>} : (!stencil.temp<[-1,68]xf64>) -> f64
"stencil.return"(%v) : (f64) -> ()
Expand All @@ -41,7 +41,7 @@ builtin.module {
}
}

// CHECK: Expected operand and result type to be equal
// CHECK: Expected input and output to have the same bounds

// -----

Expand All @@ -59,7 +59,7 @@ builtin.module {
builtin.module {
func.func @apply_no_return_1d(%in : !stencil.field<[-4,68]xf64>) {
%int = "stencil.load"(%in) : (!stencil.field<[-4,68]xf64>) -> !stencil.temp<?xf64>
"stencil.apply"(%int) ({
"stencil.apply"(%int) <{"operandSegmentSizes" = array<i32: 1, 0>}> ({
^0(%intb : !stencil.temp<?xf64>):
%v = "stencil.access"(%intb) {"offset" = #stencil.index<[-1]>} : (!stencil.temp<?xf64>) -> f64
"stencil.return"() : () -> ()
Expand All @@ -76,7 +76,7 @@ builtin.module {
func.func @access_bad_temp_1d(%in : !stencil.field<[-4,68]xf64>, %bigin : !stencil.field<[-4,68]x[-4,68]xf64>, %out : !stencil.field<[-4,68]xf64>) {
%int = "stencil.load"(%in) : (!stencil.field<[-4,68]xf64>) -> !stencil.temp<?xf64>
%bigint = "stencil.load"(%bigin) : (!stencil.field<[-4,68]x[-4,68]xf64>) -> !stencil.temp<?x?xf64>
%outt = "stencil.apply"(%int, %bigint) ({
%outt = "stencil.apply"(%int, %bigint) <{"operandSegmentSizes" = array<i32: 2, 0>}> ({
^0(%intb : !stencil.temp<?xf64>, %bigintb : !stencil.temp<?x?xf64>):
%v = "stencil.access"(%bigintb) {"offset" = #stencil.index<[-1]>} : (!stencil.temp<?x?xf64>) -> f64
"stencil.return"(%v) : (f64) -> ()
Expand All @@ -93,7 +93,7 @@ builtin.module {
builtin.module {
func.func @access_bad_offset_1d(%in : !stencil.field<[-4,68]xf64>, %out : !stencil.field<[-4,68]xf64>) {
%int = "stencil.load"(%in) : (!stencil.field<[-4,68]xf64>) -> !stencil.temp<?xf64>
%outt = "stencil.apply"(%int) ({
%outt = "stencil.apply"(%int) <{"operandSegmentSizes" = array<i32: 1, 0>}> ({
^0(%intb : !stencil.temp<?xf64>):
%v = "stencil.access"(%intb) {"offset" = #stencil.index<[-1, 1]>} : (!stencil.temp<?xf64>) -> f64
"stencil.return"(%v) : (f64) -> ()
Expand Down Expand Up @@ -122,7 +122,7 @@ builtin.module {
builtin.module {
func.func @wrong_return_arity_1d(%in : !stencil.field<[-4,68]xf64>, %bigin : !stencil.field<[-4,68]x[-4,68]xf64>, %out : !stencil.field<[-4,68]xf64>) {
%int = "stencil.load"(%in) : (!stencil.field<[-4,68]xf64>) -> !stencil.temp<?xf64>
%outt1, %outt2 = "stencil.apply"(%int) ({
%outt1, %outt2 = "stencil.apply"(%int) <{"operandSegmentSizes" = array<i32: 1, 0>}> ({
^0(%intb : !stencil.temp<?xf64>):
%v = "stencil.access"(%intb) {"offset" = #stencil.index<[-1]>} : (!stencil.temp<?xf64>) -> f64
"stencil.return"(%v) : (f64) -> ()
Expand All @@ -139,7 +139,7 @@ builtin.module {
builtin.module {
func.func @wrong_return_types_1d(%in : !stencil.field<[-4,68]xf64>, %bigin : !stencil.field<[-4,68]x[-4,68]xf64>, %out : !stencil.field<[-4,68]xf64>) {
%int = "stencil.load"(%in) : (!stencil.field<[-4,68]xf64>) -> !stencil.temp<?xf64>
%outt1, %outt2 = "stencil.apply"(%int) ({
%outt1, %outt2 = "stencil.apply"(%int) <{"operandSegmentSizes" = array<i32: 1, 0>}> ({
^0(%intb : !stencil.temp<?xf64>):
%v = "stencil.access"(%intb) {"offset" = #stencil.index<[-1]>} : (!stencil.temp<?xf64>) -> f64
"stencil.return"(%v, %v) : (f64, f64) -> ()
Expand All @@ -157,7 +157,7 @@ builtin.module {
builtin.module {
func.func @different_apply_bounds(%in : !stencil.field<[-4,68]xf64>, %bigin : !stencil.field<[-4,68]x[-4,68]xf64>, %out : !stencil.field<[-4,68]xf64>) {
%int = "stencil.load"(%in) : (!stencil.field<[-4,68]xf64>) -> !stencil.temp<?xf64>
%outt1, %outt2 = "stencil.apply"(%int) ({
%outt1, %outt2 = "stencil.apply"(%int) <{"operandSegmentSizes" = array<i32: 1, 0>}> ({
^0(%intb : !stencil.temp<?xf64>):
%v = "stencil.access"(%intb) {"offset" = #stencil.index<[-1]>} : (!stencil.temp<?xf64>) -> f64
"stencil.return"(%v, %v) : (f64, f64) -> ()
Expand Down
28 changes: 26 additions & 2 deletions tests/filecheck/dialects/stencil/stencil_ops.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ builtin.module {
%5 = stencil.access %4[0] : !stencil.temp<?xf64>
stencil.return %5 : f64
}
%6 = stencil.buffer %3 : !stencil.temp<?xf64>
%6 = stencil.buffer %3 : !stencil.temp<?xf64> -> !stencil.temp<?xf64>
%7 = stencil.apply(%8 = %6 : !stencil.temp<?xf64>) -> (!stencil.temp<?xf64>) {
%9 = stencil.access %8[0] : !stencil.temp<?xf64>
stencil.return %9 : f64
Expand All @@ -145,7 +145,7 @@ builtin.module {
// CHECK-NEXT: %5 = stencil.access %4[0] : !stencil.temp<?xf64>
// CHECK-NEXT: stencil.return %5 : f64
// CHECK-NEXT: }
// CHECK-NEXT: %4 = stencil.buffer %3 : !stencil.temp<?xf64>
// CHECK-NEXT: %4 = stencil.buffer %3 : !stencil.temp<?xf64> -> !stencil.temp<?xf64>
// CHECK-NEXT: %5 = stencil.apply(%6 = %4 : !stencil.temp<?xf64>) -> (!stencil.temp<?xf64>) {
// CHECK-NEXT: %7 = stencil.access %6[0] : !stencil.temp<?xf64>
// CHECK-NEXT: stencil.return %7 : f64
Expand Down Expand Up @@ -219,3 +219,27 @@ builtin.module {
// CHECK-NEXT: stencil.store %5 to %3 (<[0, 0], [64, 64]>) : !stencil.temp<[0,64]x[0,64]xf64> to !stencil.field<[-4,68]x[-4,68]xf64>
// CHECK-NEXT: func.return
// CHECK-NEXT: }

// -----

builtin.module {
func.func @stencil_copy_bufferized(%0 : !stencil.field<[-4,68]x[-4,68]x[-4,68]xf64>, %1 : !stencil.field<[-4,68]x[-4,68]x[-4,68]xf64>) {
stencil.apply(%6 = %0 : !stencil.field<[-4,68]x[-4,68]x[-4,68]xf64>) -> (%1 : !stencil.field<[-4,68]x[-4,68]x[-4,68]xf64>) {
%7 = stencil.access %6[0, 0, 0] : !stencil.field<[-4,68]x[-4,68]x[-4,68]xf64>
%8 = stencil.store_result %7 : !stencil.result<f64>
stencil.return %8 : !stencil.result<f64>
} to <[0, 0, 0], [64, 64, 64]>
func.return
}
}

// CHECK: builtin.module {
// CHECK-NEXT: func.func @stencil_copy_bufferized(%0 : !stencil.field<[-4,68]x[-4,68]x[-4,68]xf64>, %1 : !stencil.field<[-4,68]x[-4,68]x[-4,68]xf64>) {
// CHECK-NEXT: stencil.apply(%2 = %0 : !stencil.field<[-4,68]x[-4,68]x[-4,68]xf64>) -> (%1 : !stencil.field<[-4,68]x[-4,68]x[-4,68]xf64>) {
// CHECK-NEXT: %3 = stencil.access %2[0, 0, 0] : !stencil.field<[-4,68]x[-4,68]x[-4,68]xf64>
// CHECK-NEXT: %4 = stencil.store_result %3 : !stencil.result<f64>
// CHECK-NEXT: stencil.return %4 : !stencil.result<f64>
// CHECK-NEXT: } to <[0, 0, 0], [64, 64, 64]>
// CHECK-NEXT: func.return
// CHECK-NEXT: }
// CHECK-NEXT: }
8 changes: 4 additions & 4 deletions tests/filecheck/transforms/convert-stencil-to-ll-mlir.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ builtin.module {
%54 = stencil.access %53[-1] : !stencil.temp<[0,64]xf64>
stencil.return %54 : f64
}
%55 = stencil.buffer %52 : !stencil.temp<[1,65]xf64>
%55 = stencil.buffer %52 : !stencil.temp<[1,65]xf64> -> !stencil.temp<[1,65]xf64>
%56 = stencil.apply(%57 = %55 : !stencil.temp<[1,65]xf64>) -> (!stencil.temp<[0,64]xf64>) {
%58 = stencil.access %57[1] : !stencil.temp<[1,65]xf64>
stencil.return %58 : f64
Expand Down Expand Up @@ -591,8 +591,8 @@ func.func @store_result_lowering(%arg0 : f64) {
%98 = stencil.store_result %arg1 : !stencil.result<f64>
stencil.return %97, %98 : !stencil.result<f64>, !stencil.result<f64>
}
%99 = stencil.buffer %96 : !stencil.temp<[0,7]x[0,7]x[0,7]xf64>
%100 = stencil.buffer %95 : !stencil.temp<[0,7]x[0,7]x[0,7]xf64>
%99 = stencil.buffer %96 : !stencil.temp<[0,7]x[0,7]x[0,7]xf64> -> !stencil.temp<[0,7]x[0,7]x[0,7]xf64>
%100 = stencil.buffer %95 : !stencil.temp<[0,7]x[0,7]x[0,7]xf64> -> !stencil.temp<[0,7]x[0,7]x[0,7]xf64>
func.return
}

Expand Down Expand Up @@ -721,7 +721,7 @@ func.func @buffered_combine(%115 : !stencil.field<?x?xf64>) {
stencil.return %120 : f64
}
%121 = stencil.combine 0 at 33 lower = (%117 : !stencil.temp<[1,33]x[2,66]xf64>) upper = (%119 : !stencil.temp<[33,65]x[2,66]xf64>) : !stencil.temp<[1,65]x[2,66]xf64>
%122 = stencil.buffer %121 : !stencil.temp<[1,65]x[2,66]xf64>
%122 = stencil.buffer %121 : !stencil.temp<[1,65]x[2,66]xf64> -> !stencil.temp<[1,65]x[2,66]xf64>
%123 = stencil.apply(%124 = %122 : !stencil.temp<[1,65]x[2,66]xf64>) -> (!stencil.temp<[1,65]x[2,66]xf64>) {
%125 = arith.constant 1.000000e+00 : f64
%126 = stencil.access %124[0, 0] : !stencil.temp<[1,65]x[2,66]xf64>
Expand Down
8 changes: 4 additions & 4 deletions tests/filecheck/transforms/distribute-stencil.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ func.func @store_result_lowering(%arg0 : f64) {
%98 = stencil.store_result %arg1 : !stencil.result<f64>
stencil.return %97, %98 : !stencil.result<f64>, !stencil.result<f64>
}
%99 = stencil.buffer %96 : !stencil.temp<[0,7]x[0,7]x[0,7]xf64>
%100 = stencil.buffer %95 : !stencil.temp<[0,7]x[0,7]x[0,7]xf64>
%99 = stencil.buffer %96 : !stencil.temp<[0,7]x[0,7]x[0,7]xf64> -> !stencil.temp<[0,7]x[0,7]x[0,7]xf64>
%100 = stencil.buffer %95 : !stencil.temp<[0,7]x[0,7]x[0,7]xf64> -> !stencil.temp<[0,7]x[0,7]x[0,7]xf64>
func.return
}

Expand All @@ -133,8 +133,8 @@ func.func @store_result_lowering(%arg0 : f64) {
// CHECK-NEXT: %3 = stencil.store_result %arg1 : !stencil.result<f64>
// CHECK-NEXT: stencil.return %2, %3 : !stencil.result<f64>, !stencil.result<f64>
// CHECK-NEXT: }
// CHECK-NEXT: %2 = stencil.buffer %1 : !stencil.temp<[0,7]x[0,7]x[0,7]xf64>
// CHECK-NEXT: %3 = stencil.buffer %0 : !stencil.temp<[0,7]x[0,7]x[0,7]xf64>
// CHECK-NEXT: %2 = stencil.buffer %1 : !stencil.temp<[0,7]x[0,7]x[0,7]xf64> -> !stencil.temp<[0,7]x[0,7]x[0,7]xf64>
// CHECK-NEXT: %3 = stencil.buffer %0 : !stencil.temp<[0,7]x[0,7]x[0,7]xf64> -> !stencil.temp<[0,7]x[0,7]x[0,7]xf64>
// CHECK-NEXT: func.return
// CHECK-NEXT: }

Expand Down
16 changes: 8 additions & 8 deletions tests/filecheck/transforms/stencil-shape-inference.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ builtin.module {
%5 = stencil.access %4[0] : !stencil.temp<?xf64>
stencil.return %5 : f64
}
%6 = stencil.buffer %3 : !stencil.temp<?xf64>
%6 = stencil.buffer %3 : !stencil.temp<?xf64> -> !stencil.temp<?xf64>
%7 = stencil.apply(%8 = %6 : !stencil.temp<?xf64>) -> (!stencil.temp<?xf64>) {
%9 = stencil.access %8[0] : !stencil.temp<?xf64>
stencil.return %9 : f64
Expand All @@ -159,7 +159,7 @@ builtin.module {
// CHECK-NEXT: %5 = stencil.access %4[0] : !stencil.temp<[0,64]xf64>
// CHECK-NEXT: stencil.return %5 : f64
// CHECK-NEXT: }
// CHECK-NEXT: %4 = stencil.buffer %3 : !stencil.temp<[0,64]xf64>
// CHECK-NEXT: %4 = stencil.buffer %3 : !stencil.temp<[0,64]xf64> -> !stencil.temp<[0,64]xf64>
// CHECK-NEXT: %5 = stencil.apply(%6 = %4 : !stencil.temp<[0,64]xf64>) -> (!stencil.temp<[0,64]xf64>) {
// CHECK-NEXT: %7 = stencil.access %6[0] : !stencil.temp<[0,64]xf64>
// CHECK-NEXT: stencil.return %7 : f64
Expand Down Expand Up @@ -260,9 +260,9 @@ func.func @buffer(%arg0 : !stencil.field<?x?x?xf64>, %arg1 : !stencil.field<?x?x
stencil.return %8 : !stencil.result<f64>
}
%9, %10, %11 = stencil.combine 0 at 32 lower = (%3 : !stencil.temp<?x?x?xf64>) upper = (%3 : !stencil.temp<?x?x?xf64>) lowerext = %7 : !stencil.temp<?x?x?xf64> upperext = %5 : !stencil.temp<?x?x?xf64> : !stencil.temp<?x?x?xf64>, !stencil.temp<?x?x?xf64>, !stencil.temp<?x?x?xf64>
%12 = stencil.buffer %9 : !stencil.temp<?x?x?xf64>
%13 = stencil.buffer %10 : !stencil.temp<?x?x?xf64>
%14 = stencil.buffer %11 : !stencil.temp<?x?x?xf64>
%12 = stencil.buffer %9 : !stencil.temp<?x?x?xf64> -> !stencil.temp<?x?x?xf64>
%13 = stencil.buffer %10 : !stencil.temp<?x?x?xf64> -> !stencil.temp<?x?x?xf64>
%14 = stencil.buffer %11 : !stencil.temp<?x?x?xf64> -> !stencil.temp<?x?x?xf64>
%15 = stencil.apply(%arg3 = %12 : !stencil.temp<?x?x?xf64>) -> (!stencil.temp<?x?x?xf64>) {
%16 = stencil.access %arg3[0, 0, 0] : !stencil.temp<?x?x?xf64>
%17 = stencil.store_result %16 : !stencil.result<f64>
Expand Down Expand Up @@ -304,9 +304,9 @@ func.func @buffer(%arg0 : !stencil.field<?x?x?xf64>, %arg1 : !stencil.field<?x?x
// CHECK-NEXT: stencil.return %6 : !stencil.result<f64>
// CHECK-NEXT: }
// CHECK-NEXT: %6, %7, %8 = stencil.combine 0 at 32 lower = (%3 : !stencil.temp<[0,64]x[0,64]x[0,60]xf64>) upper = (%3 : !stencil.temp<[0,64]x[0,64]x[0,60]xf64>) lowerext = %5 : !stencil.temp<[0,32]x[0,64]x[0,60]xf64> upperext = %4 : !stencil.temp<[32,64]x[0,64]x[0,60]xf64> : !stencil.temp<[0,64]x[0,64]x[0,60]xf64>, !stencil.temp<[0,16]x[0,64]x[0,60]xf64>, !stencil.temp<[48,64]x[0,64]x[0,60]xf64>
// CHECK-NEXT: %9 = stencil.buffer %6 : !stencil.temp<[0,64]x[0,64]x[0,60]xf64>
// CHECK-NEXT: %10 = stencil.buffer %7 : !stencil.temp<[0,16]x[0,64]x[0,60]xf64>
// CHECK-NEXT: %11 = stencil.buffer %8 : !stencil.temp<[48,64]x[0,64]x[0,60]xf64>
// CHECK-NEXT: %9 = stencil.buffer %6 : !stencil.temp<[0,64]x[0,64]x[0,60]xf64> -> !stencil.temp<[0,64]x[0,64]x[0,60]xf64>
// CHECK-NEXT: %10 = stencil.buffer %7 : !stencil.temp<[0,16]x[0,64]x[0,60]xf64> -> !stencil.temp<[0,16]x[0,64]x[0,60]xf64>
// CHECK-NEXT: %11 = stencil.buffer %8 : !stencil.temp<[48,64]x[0,64]x[0,60]xf64> -> !stencil.temp<[48,64]x[0,64]x[0,60]xf64>
// CHECK-NEXT: %12 = stencil.apply(%arg3 = %9 : !stencil.temp<[0,64]x[0,64]x[0,60]xf64>) -> (!stencil.temp<[0,64]x[0,64]x[0,60]xf64>) {
// CHECK-NEXT: %13 = stencil.access %arg3[0, 0, 0] : !stencil.temp<[0,64]x[0,64]x[0,60]xf64>
// CHECK-NEXT: %14 = stencil.store_result %13 : !stencil.result<f64>
Expand Down
4 changes: 2 additions & 2 deletions tests/filecheck/transforms/stencil-tensorize-z-dimension.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ builtin.module {
%0 = "stencil.external_load"(%a) : (memref<1024x512x512xf32>) -> !stencil.field<[-1,1023]x[-1,511]x[-1,511]xf32>
%1 = "stencil.load"(%0) : (!stencil.field<[-1,1023]x[-1,511]x[-1,511]xf32>) -> !stencil.temp<[-1,1023]x[-1,511]x[-1,511]xf32>
%2 = "stencil.external_load"(%b) : (memref<1024x512x512xf32>) -> !stencil.field<[-1,1023]x[-1,511]x[-1,511]xf32>
%3 = "stencil.apply"(%1) ({
%3 = "stencil.apply"(%1) <{"operandSegmentSizes" = array<i32: 1, 0>}> ({
^0(%4 : !stencil.temp<[-1,1023]x[-1,511]x[-1,511]xf32>):
%5 = arith.constant 1.666600e-01 : f32
%6 = "stencil.access"(%4) {"offset" = #stencil.index<[1, 0, 0]>} : (!stencil.temp<[-1,1023]x[-1,511]x[-1,511]xf32>) -> f32
Expand Down Expand Up @@ -61,7 +61,7 @@ builtin.module {

func.func @gauss_seidel_func(%a : !stencil.field<[-1,1023]x[-1,511]x[-1,511]xf32>, %b : !stencil.field<[-1,1023]x[-1,511]x[-1,511]xf32>) {
%0 = "stencil.load"(%a) : (!stencil.field<[-1,1023]x[-1,511]x[-1,511]xf32>) -> !stencil.temp<[-1,1023]x[-1,511]x[-1,511]xf32>
%1 = "stencil.apply"(%0) ({
%1 = "stencil.apply"(%0) <{"operandSegmentSizes" = array<i32: 1, 0>}> ({
^0(%2 : !stencil.temp<[-1,1023]x[-1,511]x[-1,511]xf32>):
%3 = arith.constant 1.666600e-01 : f32
%4 = "stencil.access"(%2) {"offset" = #stencil.index<[1, 0, 0]>} : (!stencil.temp<[-1,1023]x[-1,511]x[-1,511]xf32>) -> f32
Expand Down
Loading
Loading