[go: nahoru, domu]

Skip to content

Commit

Permalink
Update func to func.func
Browse files Browse the repository at this point in the history
Flip parsing to form for pending upstream change.

PiperOrigin-RevId: 443668990
  • Loading branch information
jpienaar authored and TensorFlow MLIR Team committed Apr 22, 2022
1 parent 6b2160b commit 183223e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/Dialect/mhlo/legalize-control-flow.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func.func @case0_nested(%arg0 : tensor<i32>, %arg1 : tensor<4xf32>) -> tensor<4x
func.return %1 : tensor<4xf32>
}

func @sort(%arg0 : tensor<2xi32>, %arg1 : tensor<2xi32>) -> (tensor<2xi32>, tensor<2xi32>) {
func.func @sort(%arg0 : tensor<2xi32>, %arg1 : tensor<2xi32>) -> (tensor<2xi32>, tensor<2xi32>) {
%result:2 = "mhlo.sort"(%arg0, %arg1) ({
^bb0(%00: tensor<i32>, %01: tensor<i32>, %10: tensor<i32>, %11: tensor<i32>):
%50 = tensor.extract %00[] : tensor<i32>
Expand Down Expand Up @@ -323,7 +323,7 @@ func @sort(%arg0 : tensor<2xi32>, %arg1 : tensor<2xi32>) -> (tensor<2xi32>, tens
// CHECK: return %[[VAL_6:.*]]#0, %[[VAL_6]]#1 : tensor<2xi32>, tensor<2xi32>
// CHECK: }

func @dyn_sort(%arg0 : tensor<?xi32>, %arg1 : tensor<?xi32>) -> (tensor<?xi32>, tensor<?xi32>) {
func.func @dyn_sort(%arg0 : tensor<?xi32>, %arg1 : tensor<?xi32>) -> (tensor<?xi32>, tensor<?xi32>) {
%result:2 = "mhlo.sort"(%arg0, %arg1) ({
^bb0(%00: tensor<i32>, %01: tensor<i32>, %10: tensor<i32>, %11: tensor<i32>):
%50 = tensor.extract %00[] : tensor<i32>
Expand Down
12 changes: 6 additions & 6 deletions tests/copy_removal.mlir
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: mlir-hlo-opt -copy-removal -allow-unregistered-dialect -split-input-file %s | FileCheck %s

//CHECK-LABEL: @parameter_not_removed
func @parameter_not_removed(%in : memref<42xf32>) -> memref<42xf32> {
func.func @parameter_not_removed(%in : memref<42xf32>) -> memref<42xf32> {
// CHECK: memref.copy
%0 = memref.alloc() : memref<42xf32>
memref.copy %in, %0 : memref<42xf32> to memref<42xf32>
Expand All @@ -12,7 +12,7 @@ func @parameter_not_removed(%in : memref<42xf32>) -> memref<42xf32> {
// -----

// CHECK-LABEL: block_local_removed
func @block_local_removed() {
func.func @block_local_removed() {
// CHECK-NOT: memref.copy
%0 = memref.alloc() : memref<42xf32>
%1 = memref.alloc() : memref<42xf32>
Expand All @@ -26,7 +26,7 @@ func @block_local_removed() {
// -----

// CHECK-LABEL: conflicting_use
func @conflicting_use() {
func.func @conflicting_use() {
// CHECK: memref.copy
%0 = memref.alloc() : memref<42xf32>
%1 = memref.alloc() : memref<42xf32>
Expand All @@ -41,7 +41,7 @@ func @conflicting_use() {
// -----

// CHECK-LABEL: incompatible_maps
func @incompatible_maps() {
func.func @incompatible_maps() {
// CHECK: memref.copy
%0 = memref.alloc() : memref<42xf32>
%1 = memref.alloc() : memref<21xf32>
Expand All @@ -57,7 +57,7 @@ func @incompatible_maps() {
// -----

// CHECK-LABEL: compatible_maps
func @compatible_maps() {
func.func @compatible_maps() {
// CHECK-NOT: memref.copy
%0 = memref.alloc() : memref<42xf32>
%1 = memref.alloc() : memref<42xf32>
Expand All @@ -76,7 +76,7 @@ func @compatible_maps() {
// -----

// CHECK-LABEL: conflicting_alias_use
func @conflicting_alias_use() {
func.func @conflicting_alias_use() {
// CHECK: memref.copy
%0 = memref.alloc() : memref<42xf32>
%1 = memref.alloc() : memref<42xf32>
Expand Down

0 comments on commit 183223e

Please sign in to comment.