Home
last modified time | relevance | path

Searched refs:tensor (Results 1 – 25 of 2454) sorted by relevance

12345678910>>...99

/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/
Dlegalize_hlo.mlir6 // CHECK-SAME: %[[VAL_0:.*]]: tensor<1x32x10x32xi32>,
7 // CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi32>) -> tensor<1x32x10x32xi32> {
8 …[VAL_2:.*]] = "tf.AddV2"(%[[VAL_0]], %[[VAL_1]]) : (tensor<1x32x10x32xi32>, tensor<32xi32>) -> ten…
9 // CHECK: return %[[VAL_2]] : tensor<1x32x10x32xi32>
11 func @biasAdd_NHWC(%arg0: tensor<1x32x10x32xi32>, %arg1: tensor<32xi32>) -> tensor<1x32x10x32xi32> {
12 … %arg1) {broadcast_dimensions = dense<3> : tensor<1xi64>} : (tensor<1x32x10x32xi32>, tensor<32xi32…
13 return %0 : tensor<1x32x10x32xi32>
17 // CHECK-SAME: %[[VAL_0:.*]]: tensor<1x32x10x32xi32>,
18 // CHECK-SAME: %[[VAL_1:.*]]: tensor<32xi32>) -> tensor<1x32x10x32xi32> {
19 …[VAL_2:.*]] = "tf.AddV2"(%[[VAL_0]], %[[VAL_1]]) : (tensor<1x32x10x32xi32>, tensor<32xi32>) -> ten…
[all …]
Dshape_inference.mlir4 // CHECK-LABEL: func @main(%arg0: tensor<1xi32>, %arg1: tensor<1xi32>) -> tensor<1xi32>
5 func @main(%arg0: tensor<1xi32>, %arg1: tensor<1xi32>) -> tensor<*xi32> {
7 // CHECK-SAME: (tensor<1xi32>, tensor<1xi32>) -> tensor<1xi32>
8 // CHECK: return %[[RESULT]] : tensor<1xi32>
9 %0 = "tf.Cast"(%arg0) : (tensor<1xi32>) -> tensor<*xi32>
10 %1 = "tf.Cast"(%arg1) : (tensor<1xi32>) -> tensor<*xi32>
11 %2 = "tf.AddV2"(%0, %1) : (tensor<*xi32>, tensor<*xi32>) -> tensor<*xi32>
12 return %2 : tensor<*xi32>
16 func @simple_chain(%arg0: tensor<1xf32>) -> tensor<*xf32> {
17 // CHECK: %[[MUL:.*]] = "tf.Mul"{{.*}} (tensor<1xf32>, tensor<1xf32>) -> tensor<1xf32>
[all …]
Dcanonicalize.mlir4 func @tfAssertTrue(%arg0: tensor<1x1x6x2xf32>) {
5 %t = constant dense<true> : tensor<i1>
7 "tf.Assert"(%t, %arg0) {summarize = 3} : (tensor<i1>, tensor<1x1x6x2xf32>) -> ()
12 func @tfAssertFalse(%arg0: tensor<1x1x6x2xf32>) {
13 %f = constant dense<false> : tensor<i1>
15 "tf.Assert"(%f, %arg0) {summarize = 3} : (tensor<i1>, tensor<1x1x6x2xf32>) -> ()
20 func @testBatchMatMulToV2(%arg0: tensor<2x3x5xf32>, %arg1: tensor<2x5x7xf32>) -> tensor<2x3x7xf32> {
22 …Mul"(%arg0, %arg1) {adj_x = false, adj_y = false} : (tensor<2x3x5xf32>, tensor<2x5x7xf32>) -> tens…
23 return %0: tensor<2x3x7xf32>
27 func @testDynamicBatchMatMulToV2(%arg0: tensor<2x3x5xf32>, %arg1: tensor<?x5x7xf32>) -> tensor<2x3x…
[all …]
Dtf-ops.mlir17 // CHECK: "tf.opaqueIntTensor"() {bar = opaque<"tf", "0x68656C6C6F"> : tensor<2x1x4xi32>} : () -> ()
18 "tf.opaqueIntTensor"(){bar = opaque<"tf", "0x68656C6C6F"> : tensor<2x1x4xi32>} : () -> ()
19 // CHECK: "tf.opaqueFloatTensor"() {bar = opaque<"tf", "0x68656C6C6F"> : tensor<2x1x4xf32>} : () ->…
20 "tf.opaqueFloatTensor"(){bar = opaque<"tf", "0x68656C6C6F"> : tensor<2x1x4xf32>} : () -> ()
21 // CHECK: "tf.opaqueStringTensor"() {bar = opaque<"tf", "0x68656C6C6F"> : tensor<2x1x4x!tf.string>}…
22 …"tf.opaqueStringTensor"(){bar = opaque<"tf", "0x68656C6C6F"> : tensor<2x1x4x!tf.string>} : () -> ()
23 // CHECK: "tf.opaqueResourceTensor"() {bar = opaque<"tf", "0x68656C6C6F"> : tensor<2x1x4x!tf.resour…
24 …"tf.opaqueResourceTensor"(){bar = opaque<"tf", "0x68656C6C6F"> : tensor<2x1x4x!tf.resource>} : () …
35 func @testIdentity(%arg0: tensor<4x2x!tf.stringref>) -> tensor<4x2x!tf.string> {
36 %0 = "tf.Identity"(%arg0) : (tensor<4x2x!tf.stringref>) -> tensor<4x2x!tf.string>
[all …]
Dtpu_reorder_replicate_and_partitioned_inputs.mlir4tensor<!tf.resource<tensor<10x3xf32>>>, [[ARG1:%.*]]: tensor<!tf.resource<tensor<10x3xf32>>>, [[AR…
5tensor<!tf.resource<tensor<10x3xf32>>>, %arg1: tensor<!tf.resource<tensor<10x3xf32>>>, %arg2: tens…
9 …on_dim = -1 : i64} : (tensor<!tf.resource<tensor<10x3xf32>>>, tensor<!tf.resource<tensor<10x3xf32>…
10 …on_dim = -1 : i64} : (tensor<!tf.resource<tensor<10x3xf32>>>, tensor<!tf.resource<tensor<10x3xf32>…
11 …put"(%pi_0, %pi_1) : (tensor<!tf.resource<tensor<10x3xf32>>>, tensor<!tf.resource<tensor<10x3xf32>…
13 return %ri : tensor<!tf.resource<tensor<10x3xf32>>>
17tensor<!tf.resource<tensor<10x3xf32>>>, [[ARG1:%.*]]: tensor<!tf.resource<tensor<10x3xf32>>>, [[AR…
18tensor<!tf.resource<tensor<10x3xf32>>>, %arg1: tensor<!tf.resource<tensor<10x3xf32>>>, %arg2: tens…
22 …on_dim = -1 : i64} : (tensor<!tf.resource<tensor<10x3xf32>>>, tensor<!tf.resource<tensor<10x3xf32>…
23 …on_dim = -1 : i64} : (tensor<!tf.resource<tensor<10x3xf32>>>, tensor<!tf.resource<tensor<10x3xf32>…
[all …]
Dconstant-fold.mlir4 func @testShape(tensor<f32>, tensor<1x32x32x16xf32>, tensor<*xf32>) -> (tensor<0xi32>, tensor<?xi32…
5 ^bb0(%arg0: tensor<f32>, %arg1: tensor<1x32x32x16xf32>, %arg2: tensor<*xf32>):
7 // CHECK: tf.Const{{.*}} dense<> : tensor<0xi32>
8 …hape"(%arg0) {T = "tfdtype$DT_FLOAT", output = "tfdtype$DT_INT32"} : (tensor<f32>) -> tensor<0xi32>
12 // CHECK: "tf.Const"() {value = dense<[1, 32, 32, 16]> : tensor<4xi32>} : () -> tensor<?xi32>
13 …1) {T = "tfdtype$DT_FLOAT", output = "tfdtype$DT_INT32"} : (tensor<1x32x32x16xf32>) -> tensor<?xi3…
15 …pe"(%arg2) {T = "tfdtype$DT_FLOAT", output = "tfdtype$DT_INT32"} : (tensor<*xf32>) -> tensor<?xi32>
16 …pe"(%arg2) {T = "tfdtype$DT_FLOAT", output = "tfdtype$DT_INT32"} : (tensor<*xf32>) -> tensor<?xi32>
18 return %0, %1, %2 : tensor<0xi32>, tensor<?xi32>, tensor<?xi32>
22 // CHECK-SAME:(%[[ARG_0:.*]]: tensor<4xf32>, %[[ARG_1:.*]]: tensor<4xf32>) -> (tensor<4xf32>, tenso…
[all …]
Dunroll-batch-matmul.mlir3 func @batchMatMulV2TwoDim(%arg0: tensor<2x3x4x5xf32>, %arg1: tensor<2x3x5x6xf32>) -> tensor<2x3x4x6…
4 …%0 = "tf.BatchMatMulV2"(%arg0, %arg1) : (tensor<2x3x4x5xf32>, tensor<2x3x5x6xf32>) -> tensor<2x3x4…
5 return %0 : tensor<2x3x4x6xf32>
8 // CHECK: %[[cst:.*]] = "tf.Const"() {value = dense<[6, 4, 5]> : tensor<3xi64>}
9 // CHECK: %[[cst_0:.*]] = "tf.Const"() {value = dense<[1, 4, 5]> : tensor<3xi64>}
10 // CHECK: %[[cst_1:.*]] = "tf.Const"() {value = dense<[4, 5]> : tensor<2xi64>}
11 // CHECK: %[[cst_2:.*]] = "tf.Const"() {value = dense<[6, 5, 6]> : tensor<3xi64>}
12 // CHECK: %[[cst_3:.*]] = "tf.Const"() {value = dense<0> : tensor<3xi64>}
13 // CHECK: %[[cst_4:.*]] = "tf.Const"() {value = dense<[1, 0, 0]> : tensor<3xi64>}
14 // CHECK: %[[cst_5:.*]] = "tf.Const"() {value = dense<[2, 0, 0]> : tensor<3xi64>}
[all …]
Dfunctional-control-flow-to-cfg.mlir3 func private @testIf1Then(tensor<*xf32>, tensor<*xf32>) -> tensor<*xf32>
4 func private @testIf1Else(tensor<*xf32>, tensor<*xf32>) -> tensor<*xf32>
6 // CHECK-LABEL: func @testIf1Result(%arg0: tensor<i1>, %arg1: tensor<*xf32>, %arg2: tensor<*xf32>)
7 func @testIf1Result(tensor<i1>, tensor<*xf32>, tensor<*xf32>) -> tensor<*xf32> {
8 ^bb0(%arg0: tensor<i1>, %arg1: tensor<*xf32>, %arg2: tensor<*xf32>):
11 } : (tensor<i1>, tensor<*xf32>, tensor<*xf32>) -> tensor<*xf32>
13 // CHECK: [[TOBOOL:%.+]] = "tf.ToBool"(%arg0) : (tensor<i1>) -> tensor<i1>
14 // CHECK: [[PRED:%.+]] = tensor.extract [[TOBOOL]][] : tensor<i1>
18 // CHECK: br ^bb3([[THEN]] : tensor<*xf32>)
21 // CHECK: br ^bb3([[ELSE]] : tensor<*xf32>)
[all …]
Dtensor_list_ops_decomposition.mlir1 // RUN: tf-opt %s -split-input-file -verify-diagnostics -tf-tensor-list-ops-decomposition | FileChe…
3 // Test push and pop on a tensor list which is initially empty.
6 func @main() -> (tensor<f32>, tensor<i32>) {
7 // CHECK-NEXT: "tf.Const"() {value = dense<> : tensor<0xi32>}
8 %elem_shape = "tf.Const"() {value = dense<> : tensor<0xi32>} : () -> tensor<0xi32>
9 // CHECK-NEXT: "tf.Const"() {value = dense<10> : tensor<i32>}
10 %max_size = "tf.Const"() {value = dense<10> : tensor<i32>} : () -> tensor<i32>
11 …// CHECK-NEXT: %[[ZERO_SCALAR:.*]] = "tf.Const"() {value = dense<0> : tensor<i32>} : () -> tensor<…
12 // CHECK-NEXT: %[[CAST_ZERO:.*]] = "tf.Cast"(%[[ZERO_SCALAR]]) : (tensor<i32>) -> tensor<f32>
13 …// CHECK-NEXT: %[[CONST10:.*]] = "tf.Const"() {value = dense<10> : tensor<1xi32>} : () -> tensor<1…
[all …]
Dtpu_space_to_depth_pass.mlir6tensor<!tf.resource> {tf.device = "/job:localhost/replica:0/task:0/device:CPU:0"}, %arg1: tensor<!…
7 %0 = "tf.Const"() {value = dense<1> : tensor<i32>} : () -> tensor<i32>
8 %1 = "tf.Const"() {value = dense<2> : tensor<i32>} : () -> tensor<i32>
9 %2 = "tf.Const"() {value = dense<0> : tensor<i32>} : () -> tensor<i32>
10tensor<i32>, tensor<i32>, tensor<i32>, tensor<i32>, tensor<i32>, tensor<!tf.resource>, tensor<!tf.…
14tensor<i32>, %arg1: tensor<i32>, %arg2: tensor<i32>, %arg3: tensor<i32>, %arg4: tensor<i32>, %arg5…
15 %0 = "tf.Const"() {value = dense<1> : tensor<i32>} : () -> tensor<i32>
17 …{device = "/job:localhost/replica:0/task:0/device:CPU:0"} : (tensor<!tf.resource>) -> tensor<2x224…
18 …NPUT:.*]]) {block_size = 2 : i64, data_format = "NHWC"} : (tensor<2x224x224x3xf32>) -> tensor<2x11…
19 %2 = "tf.AddV2"(%arg2, %arg3) {device = ""} : (tensor<i32>, tensor<i32>) -> tensor<i32>
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/tests/
Dfuse-tftext.mlir3 …tespace_tokenizer_rank1(%arg0: tensor<1x!tf.string> {tf._user_specified_name = "input"}) -> (tenso…
4 %0 = "tf.Const"() {value = dense<[0, 1]> : tensor<2xi64>} : () -> tensor<2xi64>
5 %1 = "tf.Const"() {value = dense<[]> : tensor<0xi64>} : () -> tensor<0xi64>
6 %2 = "tf.Const"() {value = dense<true> : tensor<i1>} : () -> tensor<i1>
7 %3 = "tf.Const"() {value = dense<-1> : tensor<i32>} : () -> tensor<i32>
8 %4 = "tf.Const"() {value = dense<[[0], [1]]> : tensor<2x1xi64>} : () -> tensor<2x1xi64>
9 %5 = "tf.Const"() {value = dense<-1> : tensor<1xi32>} : () -> tensor<1xi32>
10 %6 = "tf.Const"() {value = dense<2> : tensor<1xi32>} : () -> tensor<1xi32>
11 %7 = "tf.Const"() {value = dense<1> : tensor<i32>} : () -> tensor<i32>
12 %8 = "tf.Const"() {value = dense<2> : tensor<i32>} : () -> tensor<i32>
[all …]
Dlegalize-tf.mlir3 func @add(%arg0: tensor<1xf32>, %arg1: tensor<1xf32>) -> tensor<1xf32> {
4 %0 = "tf.Add"(%arg0, %arg1) : (tensor<1xf32>, tensor<1xf32>) -> tensor<1xf32>
5 return %0: tensor<1xf32>
8 // CHECK: tfl.add %arg0, %arg1 {fused_activation_function = "NONE"} : tensor<1xf32>
12 func @sub(%arg0: tensor<1xi64>, %arg1: tensor<1xi64>) -> tensor<1xi64> {
13 %0 = "tf.Sub"(%arg0, %arg1) : (tensor<1xi64>, tensor<1xi64>) -> tensor<1xi64>
14 return %0: tensor<1xi64>
17 // CHECK: tfl.sub %arg0, %arg1 {fused_activation_function = "NONE"} : tensor<1xi64>
22 …c @testAddHighDimsHaveSameShape(%arg0: tensor<1x2x3x4x5x6x7x8xi32>, %arg1: tensor<1x2x3x4x5x6x7x8x…
24 …%0 = "tf.Add"(%arg0, %arg1) : (tensor<1x2x3x4x5x6x7x8xi32>, tensor<1x2x3x4x5x6x7x8xi32>) -> tensor
[all …]
Dlower-static-tensor-list.mlir1 // RUN: tf-opt -tfl-lower-static-tensor-list=allow-tensorlist-pass-through -split-input-file %s | F…
6 func @tensorlistConst(%arg0 : tensor<1xi32>) -> tensor<2x3xi32> {
7 …K: %[[ELEMENT0:.*]] = "tf.Const"() {value = dense<[0, 1, 2]> : tensor<3xi32>} : () -> tensor<3xi32>
8 …K: %[[ELEMENT1:.*]] = "tf.Const"() {value = dense<[3, 4, 5]> : tensor<3xi32>} : () -> tensor<3xi32>
9 ….Pack"(%[[ELEMENT0]], %[[ELEMENT1]]) {axis = 0 : i64} : (tensor<3xi32>, tensor<3xi32>) -> tensor<2…
10 …5C3030333A5C3030335C3030335C3030345C30303522"> : tensor<!tf.variant>} : () -> tensor<!tf.variant<t…
13 …%1 = "tf.TensorListStack"(%0, %arg0) : (tensor<!tf.variant<tensor<3xi32>>>, tensor<1xi32>) -> tens…
14 return %1 : tensor<2x3xi32>
17 func @emptyTensorlistConst(%arg0 : tensor<1xi32>) -> tensor<0x3xi32> {
18 …375C3030315C3032325C3030325C3031305C30303322"> : tensor<!tf.variant>} : () -> tensor<!tf.variant<t…
[all …]
Ddilated-conv.mlir3 func @testDilatedConv(%arg0: tensor<1x128x128x3xf32>, %arg1: tensor<5x5x3x8xf32>) -> tensor<1x120x1…
4 %cst = constant dense<[2, 2]> : tensor<2xi32>
5 %cst_0 = constant dense<4> : tensor<2x2xi32>
6 …tf.SpaceToBatchND"(%arg0, %cst, %cst_0) : (tensor<1x128x128x3xf32>, tensor<2xi32>, tensor<2x2xi32>…
7 …1) {padding = "VALID", strides = [1, 1, 1, 1]} : (tensor<4x68x68x3xf32>, tensor<5x5x3x8xf32>) -> t…
8 … = "tf.BatchToSpaceND"(%1, %cst, %cst_0) : (tensor<4x64x64x8xf32>, tensor<2xi32>, tensor<2x2xi32>)…
9 return %2 : tensor<1x120x120x8xf32>
12 // CHECK-SAME: ([[INPUT:%.*]]: tensor<1x128x128x3xf32>, [[FILTER:%.*]]: tensor<5x5x3x8xf32>)
13 …], padding = "VALID", strides = [1, 1, 1, 1]} : (tensor<1x128x128x3xf32>, tensor<5x5x3x8xf32>) ->
14 // CHECK-NEXT: return [[RESULT]] : tensor<1x120x120x8xf32>
[all …]
Dops.mlir7 func @testCos(tensor<? x f32>) -> tensor<? x f32> {
8 ^bb0(%arg0: tensor<? x f32>):
10 %0 = "tfl.cos"(%arg0): (tensor<? x f32>) -> tensor<? x f32>
11 return %0 : tensor<? x f32>
17 func @testCosWithWrongInputType(tensor<?xi32>) -> tensor<?xi32> {
18 ^bb0(%arg0: tensor<?xi32>):
19 // expected-error @+1 {{tfl.cos' op operand #0 must be tensor of 32-bit float values}}
20 %0 = "tfl.cos"(%arg0): (tensor<?xi32>) -> tensor<?xi32>
21 return %0#0 : tensor<?xi32>
27 func @testExp(tensor<? x f32>) -> tensor<? x f32> {
[all …]
Dtfl_while_outline.mlir10 func @while() -> tensor<1xf32>
12 %cst = constant dense<1> : tensor<i32> loc("dec")
13 %cst0 = constant dense<5> : tensor<i32> loc("N")
14 %cst1 = constant dense<3.0> : tensor<1xf32> loc("val")
16 ^bb0(%arg2: tensor<*xi32>, %arg3: tensor<*xf32>):
18 // CHECK-SAME: (tensor<*xi32>, tensor<*xf32>)
19 %cst_0 = constant dense<0> : tensor<i32>
20 %1 = "tfl.greater"(%arg2, %cst_0) : (tensor<*xi32>, tensor<i32>) -> tensor<i1>
21 "tfl.yield"(%1) : (tensor<i1>) -> ()
23 ^bb0(%arg2: tensor<*xi32>, %arg3: tensor<*xf32>):
[all …]
Dprepare-composite-functions-tf.mlir4 func @embedding(%arg0: tensor<*xf32>, %arg1: tensor<*xi32>) -> tensor<*xf32> attributes {tf._imple…
5 %0 = "tf.Const"() {value = dense<1> : tensor<i32>} : () -> tensor<i32>
6 %1 = "tf.ExpandDims"(%arg1, %0) : (tensor<*xi32>, tensor<i32>) -> tensor<*xi32>
7 %2 = "tf.Const"() {value = dense<1> : tensor<i32>} : () -> tensor<i32>
8 %3 = "tf.Const"() {value = dense<4096> : tensor<i32>} : () -> tensor<i32>
9 %4 = "tf.Const"() {value = dense<0> : tensor<i32>} : () -> tensor<i32>
10 %5 = "tf.Range"(%4, %3, %2) : (tensor<i32>, tensor<i32>, tensor<i32>) -> tensor<4096xi32>
11 %6 = "tf.Equal"(%1, %5) : (tensor<*xi32>, tensor<4096xi32>) -> tensor<*xi1>
12 %7 = "tf.Cast"(%6) : (tensor<*xi1>) -> tensor<*xf32>
13 …chMatMulV2"(%7, %arg0) {adj_x = false, adj_y = false} : (tensor<*xf32>, tensor<*xf32>) -> tensor<*…
[all …]
Dsplit-merged-operands.mlir3 func @testSingleLstm(%arg0: tensor<4x4xf32>, %arg1: tensor<4xf32>) -> tensor<4x4xf32> {
5 …0:.*]] = "tfl.pseudo_const"() {value = dense<0.000000e+00> : tensor<4x4xf32>} : () -> tensor<4x4xf…
6 …1:.*]] = "tfl.pseudo_const"() {value = dense<0.000000e+00> : tensor<4x4xf32>} : () -> tensor<4x4xf…
7tensor<4x4xf32>, tensor<4x4xf32>, tensor<4x4xf32>, tensor<4x4xf32>, tensor<4x4xf32>, tensor<4x4xf3…
9 …%0 = "tfl.pseudo_const" () {value = dense<0.0> : tensor<4x4xf32>} : () -> tensor<4x4xf32> loc("Con…
10tensor<4x4xf32>, tensor<4x4xf32>, tensor<4x4xf32>, tensor<4x4xf32>, tensor<4x4xf32>, tensor<4x4xf3…
11 return %1 : tensor<4x4xf32>
14 func @testMultipleLstms(%arg0: tensor<4x4xf32>, %arg1: tensor<4xf32>) -> tensor<4x4xf32> {
16 …0:.*]] = "tfl.pseudo_const"() {value = dense<0.000000e+00> : tensor<4x4xf32>} : () -> tensor<4x4xf…
17 …1:.*]] = "tfl.pseudo_const"() {value = dense<0.000000e+00> : tensor<4x4xf32>} : () -> tensor<4x4xf…
[all …]
Dconst-fold.mlir4 func @add_float() -> (tensor<f32>, tensor<4xf32>, tensor<4xf32>, tensor<4xf32>, tensor<4xf32>) {
5 %0 = constant dense<4.5> : tensor<f32>
6 %1 = constant dense<1.5> : tensor<f32>
8 %2 = constant dense< 3.5> : tensor<4xf32>
9 %3 = constant dense<-0.5> : tensor<4xf32>
11 // CHECK: %[[CST:.*]] = constant dense<3.500000e+00> : tensor<4xf32>
12 // CHECK: %[[CST_0:.*]] = constant dense<-5.000000e-01> : tensor<4xf32>
13 // CHECK: %[[CST_1:.*]] = constant dense<6.000000e+00> : tensor<f32>
14 // CHECK: %[[CST_2:.*]] = constant dense<4.000000e+00> : tensor<4xf32>
15 // CHECK: %[[CST_3:.*]] = constant dense<5.000000e+00> : tensor<4xf32>
[all …]
Doptimize.mlir10 func @fusedConv2dRelu(%arg0: tensor<256x32x32x3xf32>, %arg1: tensor<16x3x3x3xf32>, %arg2: tensor<16…
11 …ide_h = 4 : i32, stride_w = 5 : i32} : (tensor<256x32x32x3xf32>, tensor<16x3x3x3xf32>, tensor<16xf…
12 %1 = "tfl.relu"(%0) : (tensor<256x30x30x16xf32>) -> tensor<256x30x30x16xf32>
13 return %1 : tensor<256x30x30x16xf32>
15 …ide_h = 4 : i32, stride_w = 5 : i32} : (tensor<256x32x32x3xf32>, tensor<16x3x3x3xf32>, tensor<16xf…
20 …fusedDepthwiseConv2dRelu6(%arg0: tensor<256x32x32x3xf32>, %arg1: tensor<16x3x3x3xf32>, %arg2: tens…
21 …ide_h = 4 : i32, stride_w = 5 : i32} : (tensor<256x32x32x3xf32>, tensor<16x3x3x3xf32>, tensor<16xf…
22 %1 = "tfl.relu6"(%0) : (tensor<256x30x30x16xf32>) -> tensor<256x30x30x16xf32>
23 return %1 : tensor<256x30x30x16xf32>
25 …ide_h = 4 : i32, stride_w = 5 : i32} : (tensor<256x32x32x3xf32>, tensor<16x3x3x3xf32>, tensor<16xf…
[all …]
/external/tensorflow/tensorflow/compiler/mlir/hlo/tests/
Dcanonicalize.mlir4 func @add_fold() -> tensor<4xi64> {
5 %0 = mhlo.constant dense<[1, 2, 3, 4]> : tensor<4xi64>
6 %1 = mhlo.constant dense<[5, 6, 7, 8]> : tensor<4xi64>
8 %2 = "mhlo.add"(%0, %1) : (tensor<4xi64>, tensor<4xi64>) -> (tensor<4xi64>)
9 return %2 : tensor<4xi64>
13 func @add_scalar_fold() -> tensor<4xi64> {
14 %0 = mhlo.constant dense<1> : tensor<4xi64>
15 %1 = mhlo.constant dense<5> : tensor<4xi64>
17 %2 = "mhlo.add"(%0, %1) : (tensor<4xi64>, tensor<4xi64>) -> (tensor<4xi64>)
18 return %2 : tensor<4xi64>
[all …]
Dops.mlir17 func @alltoall(%data: tensor<4x16xf32>) -> tensor<16x4xf32> {
22 replica_groups = dense<[[0, 1, 2, 3]]> : tensor<1x4xi64>
23 } : (tensor<4x16xf32>) -> tensor<16x4xf32>
24 return %0 : tensor<16x4xf32>
30 func @alltoall_unranked_input(%data: tensor<*xf32>) -> tensor<*xf32> {
35 replica_groups = dense<[[0, 1, 2, 3, 4]]> : tensor<1x5xi64>
36 } : (tensor<*xf32>) -> tensor<*xf32>
37 return %0 : tensor<*xf32>
42 func @alltoall_invalid_split_dim_size(%data: tensor<4x16xf32>) -> tensor<16x4xf32> {
48 replica_groups = dense<[[0, 1, 2, 3, 4]]> : tensor<1x5xi64>
[all …]
/external/llvm-project/mlir/test/Dialect/Tosa/
Dops.mlir7 func @test_argmax(%arg0: tensor<14x19xf32>) -> tensor<14xi32> {
8 %0 = "tosa.argmax"(%arg0) {axis = 1 : i64} : (tensor<14x19xf32>) -> tensor<14xi32>
9 return %0 : tensor<14xi32>
14 func @test_avg_pool2d(%arg0: tensor<1x7x7x9xf32>) -> tensor<1x7x7x9xf32> {
15 …0) {kernel = [2, 2], pad = [0, 1, 0, 1], stride = [1, 1]} : (tensor<1x7x7x9xf32>) -> tensor<1x7x7x…
16 return %0 : tensor<1x7x7x9xf32>
21 func @test_conv2d(%arg0: tensor<1x4x4x4xf32>, %arg1: tensor<8x1x1x4xf32>, %arg2: tensor<8xf32>) ->
22 …], pad = [0, 0, 0, 0], stride = [1, 1]} : (tensor<1x4x4x4xf32>, tensor<8x1x1x4xf32>, tensor<8xf32>…
23 return %0 : tensor<1x4x4x8xf32>
28 func @test_depthwise_conv2d(%arg0: tensor<1x4x4x4xf32>, %arg1: tensor<1x1x4x2xf32>, %arg2: tensor<8…
[all …]
/external/llvm-project/mlir/test/IR/
Drepro_b120295301.mlir3 func @testType(tensor<1x224x224x3xf32>) -> tensor<96xf32> {
4 ^bb0(%arg0: tensor<1x224x224x3xf32>):
5 %1 = "std.constant"() {value = dense<0.1> : tensor<1xf32>} : () -> (tensor<1xf32>)
6 %2 = "std.constant"() {value = dense<0.1> : tensor<2xf32>} : () -> (tensor<2xf32>)
7 %3 = "std.constant"() {value = dense<0.1> : tensor<3xf32>} : () -> (tensor<3xf32>)
8 %4 = "std.constant"() {value = dense<0.1> : tensor<4xf32>} : () -> (tensor<4xf32>)
9 %5 = "std.constant"() {value = dense<0.1> : tensor<5xf32>} : () -> (tensor<5xf32>)
10 %6 = "std.constant"() {value = dense<0.1> : tensor<6xf32>} : () -> (tensor<6xf32>)
11 %7 = "std.constant"() {value = dense<0.1> : tensor<7xf32>} : () -> (tensor<7xf32>)
12 %8 = "std.constant"() {value = dense<0.1> : tensor<8xf32>} : () -> (tensor<8xf32>)
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tosa/tests/
Dtf-to-tosa-pipeline.mlir13 func @test_conv2d(%arg0: tensor<1x32x32x8xf32>, %arg1: tensor<1x1x8x16xf32>) -> tensor<1x32x32x16xf…
14 …des = [1, 1, 1, 1], use_cudnn_on_gpu = true} : (tensor<1x32x32x8xf32>, tensor<1x1x8x16xf32>) -> t…
15 return %3 : tensor<1x32x32x16xf32>
23 func @test_depthwise_conv2d(%arg0: tensor<1x32x32x8xf32>, %arg1: tensor<1x1x8x2xf32>) -> tensor<1x3…
24 …[], padding = "SAME", strides = [1, 1, 1, 1]} : (tensor<1x32x32x8xf32>, tensor<1x1x8x2xf32>) -> t…
25 %6 = "tf.Identity"(%5) : (tensor<1x32x32x16xf32>) -> tensor<1x32x32x16xf32>
26 return %6 : tensor<1x32x32x16xf32>
32 // CHECK-DAG: "tosa.const"() {value = dense<[2, 0, 1, 3]> : tensor<4xi32>}
33 // CHECK-DAG: "tosa.const"() {value = dense<0.000000e+00> : tensor<16xf32>}
36 func @test_transpose_conv2d(%arg0: tensor<1x32x32x8xf32>, %arg1: tensor<1x1x16x8xf32>) -> tensor<1x…
[all …]

12345678910>>...99