summaryrefslogtreecommitdiffstats
path: root/mlir/test/Dialect/FxpMathOps
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-06-25 16:06:13 -0700
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-06-25 16:06:58 -0700
commit4842b2d42e95ff4b5a8425ec7108c9e4e90e8b6c (patch)
tree04fefb7f46510e3d39bdb61d5bdcab903810f908 /mlir/test/Dialect/FxpMathOps
parent1df5f3159e538fdc12c451f09f3f879ca0200d66 (diff)
downloadbcm5719-llvm-4842b2d42e95ff4b5a8425ec7108c9e4e90e8b6c.tar.gz
bcm5719-llvm-4842b2d42e95ff4b5a8425ec7108c9e4e90e8b6c.zip
Modify the syntax of the the ElementsAttrs to print the type as a colon type.
This is the standard syntax for types on operations, and is also already used by IntegerAttr and FloatAttr. Example: dense<5> : tensor<i32> dense<[3]> : tensor<1xi32> PiperOrigin-RevId: 255069157
Diffstat (limited to 'mlir/test/Dialect/FxpMathOps')
-rw-r--r--mlir/test/Dialect/FxpMathOps/lower-uniform-casts.mlir6
-rw-r--r--mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-addew.mlir2
-rw-r--r--mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-mulew.mlir6
3 files changed, 7 insertions, 7 deletions
diff --git a/mlir/test/Dialect/FxpMathOps/lower-uniform-casts.mlir b/mlir/test/Dialect/FxpMathOps/lower-uniform-casts.mlir
index 049fae16bb9..2401bebc3af 100644
--- a/mlir/test/Dialect/FxpMathOps/lower-uniform-casts.mlir
+++ b/mlir/test/Dialect/FxpMathOps/lower-uniform-casts.mlir
@@ -5,7 +5,7 @@
!type_input = type tensor<4x!quant.uniform<i8:f32, 6.25e-2>>
!type_result = type tensor<4xf32>
func @dequantize_per_layer_fixedpoint(%arg0 : !type_input) -> !type_result {
- // CHECK: %cst = constant dense<tensor<4xf32>, 6.250000e-02>
+ // CHECK: %cst = constant dense<6.250000e-02> : tensor<4xf32>
// CHECK-NEXT: %0 = "quant.scast"(%arg0) : (tensor<4x!quant.uniform<i8:f32, 6.250000e-02>>) -> tensor<4xi8>
// CHECK-NEXT: %1 = "fxpmath.convertis"(%0) : (tensor<4xi8>) -> tensor<4xi32>
// CHECK-NEXT: %2 = "fxpmath.convertistof"(%1) : (tensor<4xi32>) -> tensor<4xf32>
@@ -20,8 +20,8 @@ func @dequantize_per_layer_fixedpoint(%arg0 : !type_input) -> !type_result {
!type_input = type tensor<4x!quant.uniform<i8:f32, 6.25e-2:-36>>
!type_result = type tensor<4xf32>
func @dequantize_per_layer_affine(%arg0 : !type_input) -> !type_result {
- // CHECK: %cst = constant dense<tensor<4xi32>, 36>
- // CHECK-NEXT: %cst_0 = constant dense<tensor<4xf32>, 6.250000e-02>
+ // CHECK: %cst = constant dense<36> : tensor<4xi32>
+ // CHECK-NEXT: %cst_0 = constant dense<6.250000e-02> : tensor<4xf32>
// CHECK-NEXT: %0 = "quant.scast"(%arg0) : (tensor<4x!quant.uniform<i8:f32, 6.250000e-02:-36>>) -> tensor<4xi8>
// CHECK-NEXT: %1 = "fxpmath.convertis"(%0) : (tensor<4xi8>) -> tensor<4xi32>
// CHECK-NEXT: %2 = addi %1, %cst : tensor<4xi32>
diff --git a/mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-addew.mlir b/mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-addew.mlir
index f3a82a6fb6b..eec131a0315 100644
--- a/mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-addew.mlir
+++ b/mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-addew.mlir
@@ -28,7 +28,7 @@ func @real_addew_fixedpoint_isomorphic(%arg0 : !type_lhs, %arg1: !type_rhs) -> !
!type_rhs = type tensor<4x!quant.uniform<i8:f32, 6.25e-2:-5>>
!type_result = type tensor<4x!quant.uniform<i8:f32, 6.25e-2:-5>>
func @real_addew_affine_isomorphic(%arg0 : !type_lhs, %arg1: !type_rhs) -> !type_result {
- // CHECK-NEXT: %cst = constant dense<tensor<4xi16>, 5>
+ // CHECK-NEXT: %cst = constant dense<5> : tensor<4xi16>
// CHECK-NEXT: %0 = "quant.scast"(%arg0) : (tensor<4x!quant.uniform<i8:f32, 6.250000e-02:-5>>) -> tensor<4xi8>
// CHECK-NEXT: %1 = "quant.scast"(%arg1) : (tensor<4x!quant.uniform<i8:f32, 6.250000e-02:-5>>) -> tensor<4xi8>
// CHECK-NEXT: %2 = "fxpmath.convertis"(%0) : (tensor<4xi8>) -> tensor<4xi16>
diff --git a/mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-mulew.mlir b/mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-mulew.mlir
index 634eb033c38..956238d48e4 100644
--- a/mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-mulew.mlir
+++ b/mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-mulew.mlir
@@ -31,9 +31,9 @@ func @real_mulew_fixedpoint(%arg0 : !type_lhs, %arg1: !type_rhs) -> !type_result
!type_result = type tensor<4x!quant.uniform<i8:f32, 6.25e-2:-9>>
func @real_mulew_affine_clamp(%arg0 : !type_lhs, %arg1: !type_rhs) -> !type_result {
// Just verify that the affine adds/constants and clamps are present.
- // CHECK: %cst = constant dense<tensor<4xi32>, 3>
- // CHECK: %cst_0 = constant dense<tensor<4xi32>, 5>
- // CHECK: %cst_1 = constant dense<tensor<4xi32>, -9>
+ // CHECK: %cst = constant dense<3> : tensor<4xi32>
+ // CHECK: %cst_0 = constant dense<5> : tensor<4xi32>
+ // CHECK: %cst_1 = constant dense<-9> : tensor<4xi32>
// CHECK: addi %2, %cst : tensor<4xi32>
// CHECK: addi %3, %cst_0 : tensor<4xi32>
// CHECK: muli %4, %5 : tensor<4xi32>
OpenPOWER on IntegriCloud