Add a test for lowering mhlo.floor to Linalg on tensors.

PiperOrigin-RevId: 331514657
This commit is contained in:
Hanhan Wang 2020-09-14 03:29:55 -07:00 committed by TensorFlow MLIR Team
parent 48022987ce
commit cf1b2b2d84
1 changed files with 10 additions and 0 deletions

View File

@ -152,6 +152,16 @@ func @float_ceil(%arg0: tensor<2x2xf32>) -> tensor<2x2xf32> {
// -----
// CHECK-LABEL: func @floor
func @floor(%input: tensor<2x2xf32>) -> tensor<2x2xf32> {
// CHECK: linalg.generic
// CHECK: floorf
%0 = "mhlo.floor"(%input) : (tensor<2x2xf32>) -> tensor<2x2xf32>
return %0 : tensor<2x2xf32>
}
// -----
// CHECK-LABEL: func @float_neg
func @float_neg(%arg0: tensor<2x2xf32>) -> tensor<2x2xf32> {
// CHECK: linalg.generic