Skip to content

Commit

Permalink
[mlir] Remove -finalizing-bufferize from tests
Browse files Browse the repository at this point in the history
This pass is not needed when the IR was bufferized with `-one-shot-bufferize`.
  • Loading branch information
matthias-springer committed Oct 4, 2024
1 parent 6937dbb commit 2b1e382
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: mlir-opt %s \
// RUN: -one-shot-bufferize="bufferize-function-boundaries" \
// RUN: -finalizing-bufferize -buffer-deallocation-pipeline -convert-bufferization-to-memref \
// RUN: -buffer-deallocation-pipeline -convert-bufferization-to-memref \
// RUN: -convert-scf-to-cf -expand-strided-metadata -lower-affine -convert-cf-to-llvm -convert-arith-to-llvm \
// RUN: -finalize-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \
// RUN: mlir-cpu-runner -e main -entry-point-result=void \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: mlir-opt %s \
// RUN: -one-shot-bufferize="bufferize-function-boundaries" \
// RUN: -finalizing-bufferize -buffer-deallocation-pipeline -convert-bufferization-to-memref \
// RUN: -buffer-deallocation-pipeline -convert-bufferization-to-memref \
// RUN: -convert-scf-to-cf -expand-strided-metadata -lower-affine -convert-cf-to-llvm -convert-arith-to-llvm \
// RUN: -finalize-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \
// RUN: mlir-cpu-runner -e main -entry-point-result=void \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: mlir-opt %s -test-linalg-transform-patterns=test-linalg-to-vector-patterns \
// RUN: -one-shot-bufferize="bufferize-function-boundaries" \
// RUN: -finalizing-bufferize -buffer-deallocation-pipeline -convert-bufferization-to-memref \
// RUN: -buffer-deallocation-pipeline -convert-bufferization-to-memref \
// RUN: -convert-linalg-to-loops -convert-scf-to-cf -expand-strided-metadata \
// RUN: -lower-affine -convert-arith-to-llvm -finalize-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \
// RUN: mlir-cpu-runner -e main -entry-point-result=void \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: mlir-opt %s \
// RUN: -one-shot-bufferize="bufferize-function-boundaries" \
// RUN: -finalizing-bufferize -buffer-deallocation-pipeline -convert-bufferization-to-memref \
// RUN: -buffer-deallocation-pipeline -convert-bufferization-to-memref \
// RUN: -convert-linalg-to-loops -convert-scf-to-cf -expand-strided-metadata \
// RUN: -lower-affine -convert-arith-to-llvm --finalize-memref-to-llvm \
// RUN: -convert-func-to-llvm -reconcile-unrealized-casts | \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: mlir-opt %s \
// RUN: -one-shot-bufferize="bufferize-function-boundaries" \
// RUN: -finalizing-bufferize -buffer-deallocation-pipeline -convert-bufferization-to-memref \
// RUN: -buffer-deallocation-pipeline -convert-bufferization-to-memref \
// RUN: -convert-linalg-to-loops -convert-scf-to-cf -expand-strided-metadata \
// RUN: -lower-affine -convert-arith-to-llvm --finalize-memref-to-llvm \
// RUN: -convert-func-to-llvm -reconcile-unrealized-casts | \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: mlir-opt %s \
// RUN: -one-shot-bufferize="bufferize-function-boundaries" \
// RUN: -finalizing-bufferize -buffer-deallocation-pipeline -convert-bufferization-to-memref -convert-linalg-to-loops \
// RUN: -buffer-deallocation-pipeline -convert-bufferization-to-memref -convert-linalg-to-loops \
// RUN: -convert-arith-to-llvm -convert-scf-to-cf -convert-cf-to-llvm --finalize-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \
// RUN: mlir-cpu-runner -e main -entry-point-result=void \
// RUN: -shared-libs=%mlir_runner_utils \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// UNSUPPORTED: asan
// RUN: mlir-opt %s -test-transform-dialect-erase-schedule \
// RUN: -one-shot-bufferize="bufferize-function-boundaries" \
// RUN: -finalizing-bufferize -buffer-deallocation-pipeline -convert-bufferization-to-memref -convert-linalg-to-loops -convert-scf-to-cf \
// RUN: -buffer-deallocation-pipeline -convert-bufferization-to-memref -convert-linalg-to-loops -convert-scf-to-cf \
// RUN: -expand-strided-metadata -lower-affine -convert-arith-to-llvm -convert-scf-to-cf --finalize-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \
// RUN: mlir-cpu-runner -e main -entry-point-result=void \
// RUN: -shared-libs=%mlir_c_runner_utils,%mlir_runner_utils \
// RUN: | FileCheck %s

// RUN: mlir-opt %s -transform-interpreter -test-transform-dialect-erase-schedule \
// RUN: -one-shot-bufferize="bufferize-function-boundaries" \
// RUN: -finalizing-bufferize -convert-linalg-to-loops -convert-scf-to-cf -convert-scf-to-cf \
// RUN: -convert-linalg-to-loops -convert-scf-to-cf -convert-scf-to-cf \
// RUN: -expand-strided-metadata -lower-affine -convert-arith-to-llvm -convert-scf-to-cf --finalize-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \
// RUN: mlir-cpu-runner -e main -entry-point-result=void \
// RUN: -shared-libs=%mlir_c_runner_utils,%mlir_runner_utils \
Expand Down
12 changes: 9 additions & 3 deletions mlir/test/Integration/GPU/CUDA/all-reduce-and.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
// RUN: --entry-point-result=void \
// RUN: | FileCheck %s

memref.global "private" constant @internal_global : memref<3x7xi32,4> = dense<467>


func.func @main() {
%data = memref.alloc() : memref<2x6xi32>
%sum = memref.alloc() : memref<2xi32>
Expand Down Expand Up @@ -61,9 +64,12 @@ func.func @main() {
// AND
gpu.launch blocks(%bx, %by, %bz) in (%grid_x = %c2, %grid_y = %c1, %grid_z = %c1)
threads(%tx, %ty, %tz) in (%block_x = %c6, %block_y = %c1, %block_z = %c1) {
%val = memref.load %data[%bx, %tx] : memref<2x6xi32>
%reduced = gpu.all_reduce and %val uniform {} : (i32) -> (i32)
memref.store %reduced, %sum[%bx] : memref<2xi32>
//%val = memref.load %data[%bx, %tx] : memref<2x6xi32>
//%reduced = gpu.all_reduce and %val uniform {} : (i32) -> (i32)
%0 = memref.get_global @internal_global : memref<3x7xi32,4>
//%c0 = arith.constant 0 : index
%v = memref.load %0[%c0, %c0] : memref<3x7xi32,4>
memref.store %v, %sum[%bx] : memref<2xi32>
gpu.terminator
}

Expand Down

0 comments on commit 2b1e382

Please sign in to comment.