Skip to content

Commit

Permalink
Syntax update.
Browse files Browse the repository at this point in the history
  • Loading branch information
PapyChacal committed Aug 20, 2024
1 parent 2c8dfae commit 11e9885
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion devito/xdsl_core/xdsl_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _jit_compile(self):

def generate_XDSL_GPU_PIPELINE():
passes = [
"stencil-shape-inference",
"shape-inference",
"convert-stencil-to-ll-mlir",
"reconcile-unrealized-casts",
"printf-to-llvm",
Expand Down
18 changes: 9 additions & 9 deletions tests/filecheck/.lit_test_times.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-8.160377e-02 shape_inference.mlir
8.171344e-02 version.mlir
-1.473970e-01 xdsl_mpi_pipeline.mlir
-1.490667e-01 xdsl_mpi_pipeline_b.mlir
-1.464252e-01 xdsl_mpi_pipeline_c.mlir
-1.516540e-01 xdsl_mpi_pipeline_d.mlir
-1.704619e-01 xdsl_mpi_pipeline_e.mlir
-1.000817e-01 xdsl_pipeline.mlir
-1.596556e-01 xdsl_pipeline_openmp.mlir
1.627717e-01 shape_inference.mlir
9.103966e-02 version.mlir
-1.920681e-01 xdsl_mpi_pipeline.mlir
-1.922677e-01 xdsl_mpi_pipeline_b.mlir
-1.886339e-01 xdsl_mpi_pipeline_c.mlir
-2.020643e-01 xdsl_mpi_pipeline_d.mlir
-2.121959e-01 xdsl_mpi_pipeline_e.mlir
-2.791779e-01 xdsl_pipeline.mlir
-1.644087e-01 xdsl_pipeline_openmp.mlir
6 changes: 3 additions & 3 deletions tests/filecheck/shape_inference.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: xdsl-opt -p stencil-shape-inference %s | filecheck %s
// RUN: xdsl-opt -p shape-inference %s | filecheck %s

builtin.module {
func.func @Kernel(%f2_vec0 : !stencil.field<[-2,5]x[-2,5]xf32>, %f2_vec1 : !stencil.field<[-2,5]x[-2,5]xf32>, %timers : !llvm.ptr) {
Expand Down Expand Up @@ -64,7 +64,7 @@ builtin.module {
%47 = arith.mulf %46, %dt_1 : f32
stencil.return %47 : f32
}
%f2_t1_temp_1 = stencil.store %f2_t1_temp to %f2_t1 ([0, 0] : [3, 3]) : !stencil.temp<?x?xf32> to !stencil.field<[-2,5]x[-2,5]xf32> with_halo : !stencil.temp<?x?xf32>
stencil.store %f2_t1_temp to %f2_t1(<[0, 0], [3, 3]>) : !stencil.temp<?x?xf32> to !stencil.field<[-2,5]x[-2,5]xf32>
scf.yield %f2_t1, %f2_t0 : !stencil.field<[-2,5]x[-2,5]xf32>, !stencil.field<[-2,5]x[-2,5]xf32>
}
%5 = func.call @timer_end(%0) : (f64) -> f64
Expand Down Expand Up @@ -139,7 +139,7 @@ builtin.module {
// CHECK-NEXT: %47 = arith.mulf %46, %dt_1 : f32
// CHECK-NEXT: stencil.return %47 : f32
// CHECK-NEXT: }
// CHECK-NEXT: %f2_t1_temp_1 = stencil.store %f2_t1_temp to %f2_t1 ([0, 0] : [3, 3]) : !stencil.temp<[0,3]x[0,3]xf32> to !stencil.field<[-2,5]x[-2,5]xf32> with_halo : !stencil.temp<?x?xf32>
// CHECK-NEXT: stencil.store %f2_t1_temp to %f2_t1(<[0, 0], [3, 3]>) : !stencil.temp<[0,3]x[0,3]xf32> to !stencil.field<[-2,5]x[-2,5]xf32>
// CHECK-NEXT: scf.yield %f2_t1, %f2_t0 : !stencil.field<[-2,5]x[-2,5]xf32>, !stencil.field<[-2,5]x[-2,5]xf32>
// CHECK-NEXT: }
// CHECK-NEXT: %5 = func.call @timer_end(%0) : (f64) -> f64
Expand Down
4 changes: 2 additions & 2 deletions tests/filecheck/xdsl_mpi_pipeline.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ builtin.module {
%73 = arith.mulf %7, %72 : f32
stencil.return %73 : f32
}
%u_t1_temp_1 = stencil.store %u_t1_temp to %u_t1 ([0, 0, 0] : [51, 101, 101]) : !stencil.temp<?x?x?xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32> with_halo : !stencil.temp<?x?x?xf32>
stencil.store %u_t1_temp to %u_t1(<[0, 0, 0], [51, 101, 101]>) : !stencil.temp<?x?x?xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
scf.yield %u_t1, %u_t2, %u_t0 : !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
}
%6 = func.call @timer_end(%0) : (f64) -> f64
Expand Down Expand Up @@ -202,7 +202,7 @@ builtin.module {
// CHECK-NEXT: %73 = arith.mulf %7, %72 : f32
// CHECK-NEXT: stencil.return %73 : f32
// CHECK-NEXT: }
// CHECK-NEXT: %u_t1_temp_1 = stencil.store %u_t1_temp to %u_t1 ([0, 0, 0] : [51, 101, 101]) : !stencil.temp<[0,51]x[0,101]x[0,101]xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32> with_halo : !stencil.temp<?x?x?xf32>
// CHECK-NEXT: stencil.store %u_t1_temp to %u_t1(<[0, 0, 0], [51, 101, 101]>) : !stencil.temp<[0,51]x[0,101]x[0,101]xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
// CHECK-NEXT: scf.yield %u_t1, %u_t2, %u_t0 : !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
// CHECK-NEXT: }
// CHECK-NEXT: %6 = func.call @timer_end(%0) : (f64) -> f64
Expand Down
4 changes: 2 additions & 2 deletions tests/filecheck/xdsl_mpi_pipeline_b.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ builtin.module {
%73 = arith.mulf %7, %72 : f32
stencil.return %73 : f32
}
%u_t1_temp_1 = stencil.store %u_t1_temp to %u_t1 ([0, 0, 0] : [51, 101, 101]) : !stencil.temp<?x?x?xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32> with_halo : !stencil.temp<?x?x?xf32>
stencil.store %u_t1_temp to %u_t1(<[0, 0, 0], [51, 101, 101]>) : !stencil.temp<?x?x?xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
scf.yield %u_t1, %u_t2, %u_t0 : !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
}
%6 = func.call @timer_end(%0) : (f64) -> f64
Expand Down Expand Up @@ -201,7 +201,7 @@ builtin.module {
// CHECK-NEXT: %73 = arith.mulf %7, %72 : f32
// CHECK-NEXT: stencil.return %73 : f32
// CHECK-NEXT: }
// CHECK-NEXT: %u_t1_temp_1 = stencil.store %u_t1_temp to %u_t1 ([0, 0, 0] : [51, 101, 101]) : !stencil.temp<[0,51]x[0,101]x[0,101]xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32> with_halo : !stencil.temp<?x?x?xf32>
// CHECK-NEXT: stencil.store %u_t1_temp to %u_t1(<[0, 0, 0], [51, 101, 101]>) : !stencil.temp<[0,51]x[0,101]x[0,101]xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
// CHECK-NEXT: scf.yield %u_t1, %u_t2, %u_t0 : !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
// CHECK-NEXT: }
// CHECK-NEXT: %6 = func.call @timer_end(%0) : (f64) -> f64
Expand Down
2 changes: 1 addition & 1 deletion tests/filecheck/xdsl_mpi_pipeline_c.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ builtin.module {
%73 = arith.mulf %7, %72 : f32
stencil.return %73 : f32
}
%u_t1_temp_1 = stencil.store %u_t1_temp to %u_t1 ([0, 0, 0] : [51, 101, 101]) : !stencil.temp<?x?x?xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32> with_halo : !stencil.temp<?x?x?xf32>
stencil.store %u_t1_temp to %u_t1(<[0, 0, 0], [51, 101, 101]>) : !stencil.temp<?x?x?xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
scf.yield %u_t1, %u_t2, %u_t0 : !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
}
%6 = func.call @timer_end(%0) : (f64) -> f64
Expand Down
2 changes: 1 addition & 1 deletion tests/filecheck/xdsl_mpi_pipeline_d.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ builtin.module {
%73 = arith.mulf %7, %72 : f32
stencil.return %73 : f32
}
%u_t1_temp_1 = stencil.store %u_t1_temp to %u_t1 ([0, 0, 0] : [51, 101, 101]) : !stencil.temp<?x?x?xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32> with_halo : !stencil.temp<?x?x?xf32>
stencil.store %u_t1_temp to %u_t1(<[0, 0, 0], [51, 101, 101]>) : !stencil.temp<?x?x?xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
scf.yield %u_t1, %u_t2, %u_t0 : !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
}
%6 = func.call @timer_end(%0) : (f64) -> f64
Expand Down
2 changes: 1 addition & 1 deletion tests/filecheck/xdsl_mpi_pipeline_e.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ builtin.module {
%73 = arith.mulf %7, %72 : f32
stencil.return %73 : f32
}
%u_t1_temp_1 = stencil.store %u_t1_temp to %u_t1 ([0, 0, 0] : [51, 101, 101]) : !stencil.temp<?x?x?xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32> with_halo : !stencil.temp<?x?x?xf32>
stencil.store %u_t1_temp to %u_t1(<[0, 0, 0], [51, 101, 101]>) : !stencil.temp<?x?x?xf32> to !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
scf.yield %u_t1, %u_t2, %u_t0 : !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>, !stencil.field<[-2,53]x[-2,103]x[-2,103]xf32>
}
%6 = func.call @timer_end(%0) : (f64) -> f64
Expand Down
4 changes: 2 additions & 2 deletions tests/filecheck/xdsl_pipeline.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: xdsl-opt -p stencil-shape-inference,convert-stencil-to-ll-mlir,scf-parallel-loop-tiling{parallel-loop-tile-sizes=64,0},printf-to-llvm,canonicalize %s | filecheck %s
// RUN: xdsl-opt -p shape-inference,convert-stencil-to-ll-mlir,scf-parallel-loop-tiling{parallel-loop-tile-sizes=64,0},printf-to-llvm,canonicalize %s | filecheck %s

builtin.module {
func.func @Kernel(%f2_vec0 : !stencil.field<[-2,5]x[-2,5]xf32>, %f2_vec1 : !stencil.field<[-2,5]x[-2,5]xf32>, %timers : !llvm.ptr) {
Expand Down Expand Up @@ -64,7 +64,7 @@ builtin.module {
%47 = arith.mulf %46, %dt_1 : f32
stencil.return %47 : f32
}
%f2_t1_temp_1 = stencil.store %f2_t1_temp to %f2_t1 ([0, 0] : [3, 3]) : !stencil.temp<?x?xf32> to !stencil.field<[-2,5]x[-2,5]xf32> with_halo : !stencil.temp<?x?xf32>
stencil.store %f2_t1_temp to %f2_t1(<[0, 0], [3, 3]>) : !stencil.temp<?x?xf32> to !stencil.field<[-2,5]x[-2,5]xf32>
scf.yield %f2_t1, %f2_t0 : !stencil.field<[-2,5]x[-2,5]xf32>, !stencil.field<[-2,5]x[-2,5]xf32>
}
%5 = func.call @timer_end(%0) : (f64) -> f64
Expand Down

0 comments on commit 11e9885

Please sign in to comment.