diff --git a/test/mlir/accelerators/nnpa/conversion/device-placement/emit-zhighir.mlir b/test/mlir/accelerators/nnpa/conversion/device-placement/emit-zhighir.mlir index 81ef00353d..a03c59b2f4 100644 --- a/test/mlir/accelerators/nnpa/conversion/device-placement/emit-zhighir.mlir +++ b/test/mlir/accelerators/nnpa/conversion/device-placement/emit-zhighir.mlir @@ -39,13 +39,13 @@ module { // CHECK-DAG: [[VAR_8_:%.+]] = "onnx.Transpose"([[VAR_2_]]) {perm = [2, 3, 1, 0]} : (tensor<8x1x5x5xf32>) -> tensor<5x5x1x8xf32> // CHECK-NOT: separator of consecutive DAGs // CHECK-DAG: [[VAR_9_:%.+]] = "zhigh.Stick"([[VAR_8_]]) {layout = "HWCK"} : (tensor<5x5x1x8xf32>) -> tensor<5x5x1x8xf16, #zhigh.layout<{dataLayout = "HWCK"}>> -// CHECK-DAG: [[VAR_10_:%.+]] = "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "1D", value = dense<[-0.161539719, -0.433835655, 0.091641359, -0.0168522168, -0.0650264397, -0.131737873, 0.0204175506, -0.121110231]> : tensor<8xf32>} : () -> tensor<8xf16, #zhigh.layout<{dataLayout = "1D"}>> +// CHECK-DAG: [[VAR_10_:%.+]] = "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<[-0.161539719, -0.433835655, 0.091641359, -0.0168522168, -0.0650264397, -0.131737873, 0.0204175506, -0.121110231]> : tensor<8xf32>} : () -> tensor<8xf16, #zhigh.layout<{dataLayout = "1D"}>> // CHECK: [[VAR_11_:%.+]] = "zhigh.Conv2D"([[VAR_7_]], [[VAR_9_]], [[VAR_10_]]) {act_func = "ACT_RELU", kernel_shape = [5, 5], padding_type = "SAME_PADDING", strides = [1, 1]} : (tensor<1x28x28x1xf16, #zhigh.layout<{dataLayout = "NHWC"}>>, tensor<5x5x1x8xf16, #zhigh.layout<{dataLayout = "HWCK"}>>, tensor<8xf16, #zhigh.layout<{dataLayout = "1D"}>>) -> tensor<1x28x28x8xf16, #zhigh.layout<{dataLayout = "NHWC"}>> // CHECK-DAG: [[VAR_12_:%.+]] = "zhigh.MaxPool2D"([[VAR_11_]]) {kernel_shape = [2, 2], padding_type = "VALID_PADDING", strides = [2, 2]} : (tensor<1x28x28x8xf16, #zhigh.layout<{dataLayout = "NHWC"}>>) -> tensor<1x14x14x8xf16, #zhigh.layout<{dataLayout = "NHWC"}>> // CHECK-DAG: [[VAR_13_:%.+]] = "onnx.Transpose"([[VAR_1_]]) {perm = [2, 3, 1, 0]} : (tensor<16x8x5x5xf32>) -> tensor<5x5x8x16xf32> // CHECK-NOT: separator of consecutive DAGs // CHECK-DAG: [[VAR_14_:%.+]] = "zhigh.Stick"([[VAR_13_]]) {layout = "HWCK"} : (tensor<5x5x8x16xf32>) -> tensor<5x5x8x16xf16, #zhigh.layout<{dataLayout = "HWCK"}>> -// CHECK-DAG: [[VAR_15_:%.+]] = "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "1D", value = dense<[-0.0822488219, -0.108868778, -0.141039595, -0.204869166, -0.17913565, -0.215438381, -0.133805066, -0.195724562, -0.268250644, -0.258212209, -0.0761560649, 0.0132841459, -0.00444464432, -0.414740831, -0.17879115, -0.0386558883]> : tensor<16xf32>} : () -> tensor<16xf16, #zhigh.layout<{dataLayout = "1D"}>> +// CHECK-DAG: [[VAR_15_:%.+]] = "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<[-0.0822488219, -0.108868778, -0.141039595, -0.204869166, -0.17913565, -0.215438381, -0.133805066, -0.195724562, -0.268250644, -0.258212209, -0.0761560649, 0.0132841459, -0.00444464432, -0.414740831, -0.17879115, -0.0386558883]> : tensor<16xf32>} : () -> tensor<16xf16, #zhigh.layout<{dataLayout = "1D"}>> // CHECK: [[VAR_16_:%.+]] = "zhigh.Conv2D"([[VAR_12_]], [[VAR_14_]], [[VAR_15_]]) {act_func = "ACT_RELU", kernel_shape = [5, 5], padding_type = "SAME_PADDING", strides = [1, 1]} : (tensor<1x14x14x8xf16, #zhigh.layout<{dataLayout = "NHWC"}>>, tensor<5x5x8x16xf16, #zhigh.layout<{dataLayout = "HWCK"}>>, tensor<16xf16, #zhigh.layout<{dataLayout = "1D"}>>) -> tensor<1x14x14x16xf16, #zhigh.layout<{dataLayout = "NHWC"}>> // CHECK: [[VAR_17_:%.+]] = "zhigh.MaxPool2D"([[VAR_16_]]) {kernel_shape = [3, 3], padding_type = "VALID_PADDING", strides = [3, 3]} : (tensor<1x14x14x16xf16, #zhigh.layout<{dataLayout = "NHWC"}>>) -> tensor<1x4x4x16xf16, #zhigh.layout<{dataLayout = "NHWC"}>> // CHECK: [[VAR_18_:%.+]] = "zhigh.Unstick"([[VAR_17_]]) : (tensor<1x4x4x16xf16, #zhigh.layout<{dataLayout = "NHWC"}>>) -> tensor<1x16x4x4xf32> diff --git a/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/conv.mlir b/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/conv.mlir index 8e5b833840..eb184a4edb 100644 --- a/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/conv.mlir +++ b/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/conv.mlir @@ -189,7 +189,7 @@ func.func @conv_same_padding_no_bias_unknown_dims(%arg0: tensor<1x32x32x3xf16, # // CHECK: krnl.store [[VAR_c1_i64_]], [[RES_1_]]{{.}}[[VAR_c4_]]{{.}} : memref<7xi64> // CHECK: krnl.store [[VAR_c32_i64_]], [[RES_1_]]{{.}}[[VAR_c5_]]{{.}} : memref<7xi64> // CHECK: krnl.store [[VAR_c32_i64_]], [[RES_1_]]{{.}}[[VAR_c6_]]{{.}} : memref<7xi64> -// CHECK: [[VAR_2_:%.+]] = "zlow.stickifiedConstant"() {alignment = 4096 : i64, init = true, name = "constant_stickify_0", offset = 0 : i64, shape = [1, 1, 1, 1, 32, 64]} : () -> memref<1x1x1x1x32x64xf16> +// CHECK: [[VAR_2_:%.+]] = "zlow.stickifiedConstant"() {alignment = 4096 : i64, allzero = true, name = "constant_stickify_0", offset = 0 : i64, shape = [1, 1, 1, 1, 32, 64]} : () -> memref<1x1x1x1x32x64xf16> // CHECK: "zlow.conv2d"([[PARAM_0_]], [[PARAM_1_]], [[VAR_2_]], [[RES_1_]], [[RES_]]) {act_func = "ACT_NONE", kernel_shape = [2, 2], padding_type = "SAME_PADDING", strides = [1, 1]} : (memref<1x32x32x3xf16, #map>, memref<2x2x3x1xf16, #map1>, memref<1x1x1x1x32x64xf16>, memref<7xi64>, memref<1x32x32x1xf16, #map>) -> () // CHECK: return [[RES_]] : memref<1x32x32x1xf16, #map> // CHECK: } diff --git a/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/gru.mlir b/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/gru.mlir index 2972841444..141fb61d1c 100644 --- a/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/gru.mlir +++ b/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/gru.mlir @@ -220,8 +220,8 @@ func.func @gru_no_input_and_hidden_biases(%input : tensor // CHECK: krnl.store [[VAR_c7_i64_]], [[RES_1_]]{{.}}[[VAR_c3_]]{{.}} : memref<5xi64> // CHECK: krnl.store [[VAR_c9_i64_]], [[RES_1_]]{{.}}[[VAR_c4_]]{{.}} : memref<5xi64> -// CHECK-DAG: [[VAR_2_:%.+]] = "zlow.stickifiedConstant"() {alignment = 4096 : i64, init = true, name = "constant_stickify_0", offset = 0 : i64, shape = [1, 3, 1, 1, 32, 64]} : () -> memref<1x3x1x1x32x64xf16> -// CHECK-DAG: [[VAR_3_:%.+]] = "zlow.stickifiedConstant"() {alignment = 4096 : i64, init = true, name = "constant_stickify_1", offset = 0 : i64, shape = [1, 3, 1, 1, 32, 64]} : () -> memref<1x3x1x1x32x64xf16> +// CHECK-DAG: [[VAR_2_:%.+]] = "zlow.stickifiedConstant"() {alignment = 4096 : i64, allzero = true, name = "constant_stickify_0", offset = 0 : i64, shape = [1, 3, 1, 1, 32, 64]} : () -> memref<1x3x1x1x32x64xf16> +// CHECK-DAG: [[VAR_3_:%.+]] = "zlow.stickifiedConstant"() {alignment = 4096 : i64, allzero = true, name = "constant_stickify_1", offset = 0 : i64, shape = [1, 3, 1, 1, 32, 64]} : () -> memref<1x3x1x1x32x64xf16> // CHECK-DAG: [[VAR_dim_2_:%.+]] = memref.dim [[PARAM_0_]], [[VAR_c0_]] : memref // CHECK-DAG: [[VAR_dim_3_:%.+]] = memref.dim [[PARAM_0_]], [[VAR_c1_]] : memref // CHECK-NOT: separator of consecutive DAGs diff --git a/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/lstm.mlir b/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/lstm.mlir index 9627289958..5e6ba43e77 100644 --- a/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/lstm.mlir +++ b/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/lstm.mlir @@ -357,8 +357,8 @@ func.func @lstm_no_input_and_hidden_biases(%input : tensor // CHECK: krnl.store [[VAR_c7_i64_]], [[RES_2_]]{{.}}[[VAR_c3_]]{{.}} : memref<5xi64> // CHECK: krnl.store [[VAR_c9_i64_]], [[RES_2_]]{{.}}[[VAR_c4_]]{{.}} : memref<5xi64> -// CHECK-DAG: [[VAR_2_:%.+]] = "zlow.stickifiedConstant"() {alignment = 4096 : i64, init = true, name = "constant_stickify_0", offset = 0 : i64, shape = [1, 4, 1, 1, 32, 64]} : () -> memref<1x4x1x1x32x64xf16> -// CHECK-DAG: [[VAR_3_:%.+]] = "zlow.stickifiedConstant"() {alignment = 4096 : i64, init = true, name = "constant_stickify_1", offset = 0 : i64, shape = [1, 4, 1, 1, 32, 64]} : () -> memref<1x4x1x1x32x64xf16> +// CHECK-DAG: [[VAR_2_:%.+]] = "zlow.stickifiedConstant"() {alignment = 4096 : i64, allzero = true, name = "constant_stickify_0", offset = 0 : i64, shape = [1, 4, 1, 1, 32, 64]} : () -> memref<1x4x1x1x32x64xf16> +// CHECK-DAG: [[VAR_3_:%.+]] = "zlow.stickifiedConstant"() {alignment = 4096 : i64, allzero = true, name = "constant_stickify_1", offset = 0 : i64, shape = [1, 4, 1, 1, 32, 64]} : () -> memref<1x4x1x1x32x64xf16> // CHECK-DAG: [[VAR_dim_3_:%.+]] = memref.dim [[PARAM_0_]], [[VAR_c0_]] : memref // CHECK-DAG: [[VAR_dim_4_:%.+]] = memref.dim [[PARAM_0_]], [[VAR_c1_]] : memref // CHECK-NOT: separator of consecutive DAGs diff --git a/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/stickified-constant.mlir b/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/stickified-constant.mlir index 06a7b68028..d826e86969 100644 --- a/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/stickified-constant.mlir +++ b/test/mlir/accelerators/nnpa/conversion/zhigh-to-zlow/stickified-constant.mlir @@ -12,7 +12,7 @@ module { // CHECK-DAG: [[MAP_0_:#.+]] = affine_map<(d0, d1) -> (0, d1 floordiv 64, 0, d0 floordiv 32, d0 mod 32, d1 mod 64)> // CHECK-LABEL: func @remove_stick_2d // CHECK-SAME: () -> memref<2x3xf32> { -// CHECK-DAG: [[VAR_0_:%.+]] = "zlow.stickifiedConstant"() {alignment = 4096 : i64, layout = "2D", name = "constant_stickify_0", offset = 0 : i64, shape = [1, 1, 1, 1, 32, 64], value = dense<{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}> : tensor<2x3xf32>} : () -> memref<2x3xf16, #map> +// CHECK-DAG: [[VAR_0_:%.+]] = "zlow.stickifiedConstant"() {alignment = 4096 : i64, name = "constant_stickify_0", offset = 0 : i64, shape = [1, 1, 1, 1, 32, 64], value = dense<{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}> : tensor<2x3xf32>} : () -> memref<2x3xf16, #map> // CHECK-DAG: [[VAR_c2_:%.+]] = arith.constant 2 : index // CHECK-DAG: [[VAR_c3_:%.+]] = arith.constant 3 : index // CHECK-DAG: [[RES_:%.+]] = memref.alloc() {{.*}}: memref<2x3xf32> diff --git a/test/mlir/accelerators/nnpa/driver/dense-out-attention-layer.mlir b/test/mlir/accelerators/nnpa/driver/dense-out-attention-layer.mlir index 091663a32b..11ccc619a0 100644 --- a/test/mlir/accelerators/nnpa/driver/dense-out-attention-layer.mlir +++ b/test/mlir/accelerators/nnpa/driver/dense-out-attention-layer.mlir @@ -14,6 +14,6 @@ func.func @test_matmul_add_add(%arg0: tensor, %arg1: tensor<768x768 // CHECK-SAME: ([[PARAM_0_:%.+]]: tensor, [[PARAM_1_:%.+]]: tensor<768x768xf32>) -> tensor { // CHECK-DAG: [[VAR_0_:%.+]] = "zhigh.Stick"([[PARAM_0_]]) {layout = "3DS"} : (tensor) -> tensor> // CHECK-DAG: [[VAR_1_:%.+]] = "zhigh.Stick"([[PARAM_1_]]) {layout = "2D"} : (tensor<768x768xf32>) -> tensor<768x768xf16, #zhigh.layout<{dataLayout = "2D"}>> -// CHECK-DAG: [[VAR_2_:%.+]] = "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "1D", value = dense<5.000000e+00> : tensor<768xf32>} : () -> tensor<768xf16, #zhigh.layout<{dataLayout = "1D"}>> +// CHECK-DAG: [[VAR_2_:%.+]] = "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<5.000000e+00> : tensor<768xf32>} : () -> tensor<768xf16, #zhigh.layout<{dataLayout = "1D"}>> // CHECK: [[VAR_3_:%.+]] = "zhigh.MatMul"([[VAR_0_]], [[VAR_1_]], [[VAR_2_]]) : (tensor>, tensor<768x768xf16, #zhigh.layout<{dataLayout = "2D"}>>, tensor<768xf16, #zhigh.layout<{dataLayout = "1D"}>>) -> tensor> } diff --git a/test/mlir/accelerators/nnpa/transform/zhigh-constant-propagation-be/constprop.mlir b/test/mlir/accelerators/nnpa/transform/zhigh-constant-propagation-be/constprop.mlir index ab1c25860c..27c53c501b 100644 --- a/test/mlir/accelerators/nnpa/transform/zhigh-constant-propagation-be/constprop.mlir +++ b/test/mlir/accelerators/nnpa/transform/zhigh-constant-propagation-be/constprop.mlir @@ -9,7 +9,7 @@ func.func @remove_stick_1d() -> tensor<6xf16, #zhigh.layout<{dataLayout = "1D"}> %res = "zhigh.Stick"(%inp) {layout = "1D"} : (tensor<6xf32>) -> tensor<6xf16, #zhigh.layout<{dataLayout = "1D"}>> return %res : tensor<6xf16, #zhigh.layout<{dataLayout = "1D"}>> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "1D", value = dense<[0.000000e+00, 1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00]> : tensor<6xf32>} : () -> tensor<6xf16, #zhigh.layout<{dataLayout = "1D"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<[0.000000e+00, 1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00]> : tensor<6xf32>} : () -> tensor<6xf16, #zhigh.layout<{dataLayout = "1D"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.Stick" @@ -26,7 +26,7 @@ func.func @remove_stick_2d() -> tensor<2x3xf32> { %res = "zhigh.Unstick"(%st) {layout = "2D"} : (tensor<2x3xf16, #zhigh.layout<{dataLayout = "2D"}>>) -> tensor<2x3xf32> return %res : tensor<2x3xf32> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "2D", value = dense<{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}> : tensor<2x3xf32>} : () -> tensor<2x3xf16, #zhigh.layout<{dataLayout = "2D"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}> : tensor<2x3xf32>} : () -> tensor<2x3xf16, #zhigh.layout<{dataLayout = "2D"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.Stick" @@ -41,7 +41,7 @@ func.func @remove_stick_2ds() -> tensor<2x3xf16, #zhigh.layout<{dataLayout = "2D %res = "zhigh.Stick"(%inp) {layout = "2DS"} : (tensor<2x3xf32>) -> tensor<2x3xf16, #zhigh.layout<{dataLayout = "2DS"}>> return %res : tensor<2x3xf16, #zhigh.layout<{dataLayout = "2DS"}>> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "2DS", value = dense<{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}> : tensor<2x3xf32>} : () -> tensor<2x3xf16, #zhigh.layout<{dataLayout = "2DS"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}> : tensor<2x3xf32>} : () -> tensor<2x3xf16, #zhigh.layout<{dataLayout = "2DS"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.Stick" @@ -56,7 +56,7 @@ func.func @remove_stick_3d() -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "3 %res = "zhigh.Stick"(%inp) {layout = "3D"} : (tensor<1x2x3xf32>) -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "3D"}>> return %res : tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "3D"}>> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "3D", value = dense<{{.}}{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}{{.}}> : tensor<1x2x3xf32>} : () -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "3D"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<{{.}}{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}{{.}}> : tensor<1x2x3xf32>} : () -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "3D"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.Stick" @@ -71,7 +71,7 @@ func.func @remove_stick_3ds() -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = " %res = "zhigh.Stick"(%inp) {layout = "3DS"} : (tensor<1x2x3xf32>) -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "3DS"}>> return %res : tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "3DS"}>> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "3DS", value = dense<{{.}}{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}{{.}}> : tensor<1x2x3xf32>} : () -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "3DS"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<{{.}}{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}{{.}}> : tensor<1x2x3xf32>} : () -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "3DS"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.Stick" @@ -86,7 +86,7 @@ func.func @remove_stick_4d() -> tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = %res = "zhigh.Stick"(%inp) {layout = "4D"} : (tensor<1x1x2x3xf32>) -> tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = "4D"}>> return %res : tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = "4D"}>> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "4D", value = dense<{{.}}[{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}{{.}}]> : tensor<1x1x2x3xf32>} : () -> tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = "4D"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<{{.}}[{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}{{.}}]> : tensor<1x1x2x3xf32>} : () -> tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = "4D"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.Stick" @@ -101,7 +101,7 @@ func.func @remove_stick_nhwc() -> tensor<1x2x3x1xf16, #zhigh.layout<{dataLayout %res = "zhigh.Stick"(%inp) {layout = "NHWC"} : (tensor<1x1x2x3xf32>) -> tensor<1x2x3x1xf16, #zhigh.layout<{dataLayout = "NHWC"}>> return %res : tensor<1x2x3x1xf16, #zhigh.layout<{dataLayout = "NHWC"}>> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "NHWC", value = dense<{{.}}[{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}{{.}}]> : tensor<1x1x2x3xf32>} : () -> tensor<1x2x3x1xf16, #zhigh.layout<{dataLayout = "NHWC"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<{{.}}[{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}{{.}}]> : tensor<1x1x2x3xf32>} : () -> tensor<1x2x3x1xf16, #zhigh.layout<{dataLayout = "NHWC"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.Stick" @@ -116,7 +116,7 @@ func.func @remove_stick_nchw() -> tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout %res = "zhigh.Stick"(%inp) {layout = "NCHW"} : (tensor<1x1x2x3xf32>) -> tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = "NCHW"}>> return %res : tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = "NCHW"}>> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "NCHW", value = dense<{{.}}[{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}{{.}}]> : tensor<1x1x2x3xf32>} : () -> tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = "NCHW"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<{{.}}[{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}{{.}}]> : tensor<1x1x2x3xf32>} : () -> tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = "NCHW"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.Stick" @@ -131,7 +131,7 @@ func.func @remove_stick_cnnk_hwck() -> tensor<1x1x2x3xf16, #zhigh.layout<{dataLa %res = "zhigh.Stick"(%inp) {layout = "HWCK"} : (tensor<1x1x2x3xf32>) -> tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = "HWCK"}>> return %res : tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = "HWCK"}>> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "HWCK", value = dense<{{.}}[{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}{{.}}]> : tensor<1x1x2x3xf32>} : () -> tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = "HWCK"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<{{.}}[{{.}}[0.000000e+00, 1.000000e+00, 2.000000e+00], [3.000000e+00, 4.000000e+00, 5.000000e+00]{{.}}{{.}}]> : tensor<1x1x2x3xf32>} : () -> tensor<1x1x2x3xf16, #zhigh.layout<{dataLayout = "HWCK"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.Stick" @@ -149,7 +149,7 @@ func.func @remove_stick_zrh_2d() -> tensor<2x3xf16, #zhigh.layout<{dataLayout = %res = "zhigh.StickForGRU"(%z, %r, %h) : (tensor<2x3xf32>, tensor<2x3xf32>, tensor<2x3xf32>) -> tensor<2x3xf16, #zhigh.layout<{dataLayout = "ZRH"}>> return %res : tensor<2x3xf16, #zhigh.layout<{dataLayout = "ZRH"}>> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, value = dense_resource : tensor<24576xi8>} : () -> tensor<2x3xf16, #zhigh.layout<{dataLayout = "ZRH"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = true, value = dense_resource : tensor<24576xi8>} : () -> tensor<2x3xf16, #zhigh.layout<{dataLayout = "ZRH"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.StickForGRU" @@ -173,7 +173,7 @@ func.func @remove_stick_zrh_3d() -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout %res = "zhigh.StickForGRU"(%z, %r, %h) : (tensor<1x2x3xf32>, tensor<1x2x3xf32>, tensor<1x2x3xf32>) -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "ZRH"}>> return %res : tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "ZRH"}>> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, value = dense_resource : tensor<12288xi8>} : () -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "ZRH"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = true, value = dense_resource : tensor<12288xi8>} : () -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "ZRH"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.StickForGRU" @@ -198,7 +198,7 @@ func.func @remove_stick_fico_2d() -> tensor<2x3xf16, #zhigh.layout<{dataLayout = %res = "zhigh.StickForLSTM"(%f, %i, %c, %o) : (tensor<2x3xf32>, tensor<2x3xf32>, tensor<2x3xf32>, tensor<2x3xf32>) -> tensor<2x3xf16, #zhigh.layout<{dataLayout = "FICO"}>> return %res : tensor<2x3xf16, #zhigh.layout<{dataLayout = "FICO"}>> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, value = dense_resource : tensor<32768xi8>} : () -> tensor<2x3xf16, #zhigh.layout<{dataLayout = "FICO"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = true, value = dense_resource : tensor<32768xi8>} : () -> tensor<2x3xf16, #zhigh.layout<{dataLayout = "FICO"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.StickForLSTM" @@ -223,7 +223,7 @@ func.func @remove_stick_fico_3d() -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout %res = "zhigh.StickForLSTM"(%f, %i, %c, %o) : (tensor<1x2x3xf32>, tensor<1x2x3xf32>, tensor<1x2x3xf32>, tensor<1x2x3xf32>) -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "FICO"}>> return %res : tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "FICO"}>> - // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, value = dense_resource : tensor<16384xi8>} : () -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "FICO"}>> + // CHECK-NEXT: "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = true, value = dense_resource : tensor<16384xi8>} : () -> tensor<1x2x3xf16, #zhigh.layout<{dataLayout = "FICO"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.StickForLSTM" @@ -244,7 +244,7 @@ func.func @out_of_range_minimum() -> tensor<1xf16, #zhigh.layout<{dataLayout = " %res = "zhigh.Stick"(%inp) {layout = "1D"} : (tensor<1xf32>) -> tensor<1xf16, #zhigh.layout<{dataLayout = "1D"}>> return %res : tensor<1xf16, #zhigh.layout<{dataLayout = "1D"}>> - // CHECK-NEXT: %0 = "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "1D", value = dense<-3.402820e+38> : tensor<1xf32>} : () -> tensor<1xf16, #zhigh.layout<{dataLayout = "1D"}>> + // CHECK-NEXT: %0 = "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<-3.402820e+38> : tensor<1xf32>} : () -> tensor<1xf16, #zhigh.layout<{dataLayout = "1D"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.Stick" @@ -258,7 +258,7 @@ func.func @out_of_range_maximum() -> tensor<1xf16, #zhigh.layout<{dataLayout = " %res = "zhigh.Stick"(%inp) {layout = "1D"} : (tensor<1xf32>) -> tensor<1xf16, #zhigh.layout<{dataLayout = "1D"}>> return %res : tensor<1xf16, #zhigh.layout<{dataLayout = "1D"}>> - // CHECK-NEXT: %0 = "zhigh.StickifiedConstant"() {alignment = 4096 : i64, layout = "1D", value = dense<3.402820e+38> : tensor<1xf32>} : () -> tensor<1xf16, #zhigh.layout<{dataLayout = "1D"}>> + // CHECK-NEXT: %0 = "zhigh.StickifiedConstant"() {alignment = 4096 : i64, stickified = false, value = dense<3.402820e+38> : tensor<1xf32>} : () -> tensor<1xf16, #zhigh.layout<{dataLayout = "1D"}>> // CHECK-NOT: "onnx.Constant" // CHECK-NOT: "zhigh.Stick"