summaryrefslogtreecommitdiffstats
path: root/mlir/test/Dialect/FxpMathOps
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-06-13 17:24:33 -0700
committerMehdi Amini <joker.eph@gmail.com>2019-06-19 23:01:52 -0700
commit6a0555a87545bdd50c783271c08a9e50f871ca8f (patch)
tree47f7564473265437f91f2362cf023cc5060882e4 /mlir/test/Dialect/FxpMathOps
parent2c9269124a71df8dfb20736694e4a3adca0b0b1e (diff)
downloadbcm5719-llvm-6a0555a87545bdd50c783271c08a9e50f871ca8f.tar.gz
bcm5719-llvm-6a0555a87545bdd50c783271c08a9e50f871ca8f.zip
Refactor SplatElementsAttr to inherit from DenseElementsAttr as opposed to being a separate Attribute type. DenseElementsAttr provides a better internal representation for splat values as well as better API for accessing elements.
PiperOrigin-RevId: 253138287
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 14d98a0babb..049fae16bb9 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 splat<tensor<4xf32>, 6.250000e-02>
+ // CHECK: %cst = constant dense<tensor<4xf32>, 6.250000e-02>
// 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 splat<tensor<4xi32>, 36>
- // CHECK-NEXT: %cst_0 = constant splat<tensor<4xf32>, 6.250000e-02>
+ // CHECK: %cst = constant dense<tensor<4xi32>, 36>
+ // CHECK-NEXT: %cst_0 = constant dense<tensor<4xf32>, 6.250000e-02>
// 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 5f73979bfa1..f3a82a6fb6b 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 splat<tensor<4xi16>, 5>
+ // CHECK-NEXT: %cst = constant dense<tensor<4xi16>, 5>
// 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 edfdc8b6ab7..f1041ae8420 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 splat<tensor<4xi32>, 3>
- // CHECK: %cst_0 = constant splat<tensor<4xi32>, 5>
- // CHECK: %cst_1 = constant splat<tensor<4xi32>, -9>
+ // CHECK: %cst = constant dense<tensor<4xi32>, 3>
+ // CHECK: %cst_0 = constant dense<tensor<4xi32>, 5>
+ // CHECK: %cst_1 = constant dense<tensor<4xi32>, -9>
// CHECK: addi %2, %cst : tensor<4xi32>
// CHECK: addi %3, %cst_0 : tensor<4xi32>
// CHECK: muli %4, %5 : tensor<4xi32>
OpenPOWER on IntegriCloud