/external/tensorflow/tensorflow/core/ir/tests/ |
D | types.mlir | 1 // RUN: tfg-opt-no-passes %s | tfg-opt-no-passes | FileCheck %s 3 // CHECK: module attributes {tfg.type = !tf_type.qint8 4 module attributes {tfg.type = !tf_type.qint8} {} 5 // CHECK: module attributes {tfg.type = !tf_type.qint16 6 module attributes {tfg.type = !tf_type.qint16} {} 7 // CHECK: module attributes {tfg.type = !tf_type.qint32 8 module attributes {tfg.type = !tf_type.qint32} {} 9 // CHECK: module attributes {tfg.type = !tf_type.quint8 10 module attributes {tfg.type = !tf_type.quint8} {} 11 // CHECK: module attributes {tfg.type = !tf_type.quint16 [all …]
|
D | ops.mlir | 1 // RUN: tfg-opt-no-passes %s | tfg-opt-no-passes | FileCheck %s 5 // CHECK-LABEL: tfg.graph 7 tfg.graph #tf_type.version<producer = 42, min_consumer = 33> { 11 %arg0, %ctl = "tfg.placeholder"() : () -> (tensor<*xi32>, !tf_type.control) 12 …%add, %ctl3 = "tfg.AddV2"(%arg0, %arg1) {"_mlir_device" = "GPU", _mlir_assigned_device = "TPU", so… 13 …%arg1, %ctl2 = "tfg.placeholder"() {"_mlir_device" = "CPU", _mlir_name = "foobar"} : () -> (tensor… 15 %ctl4 = tfg._Arg 18 // CHECK-LABEL: tfg.graph 20 tfg.graph #tf_type.version<producer = 1, min_consumer = 1, bad_consumers = [1, 2, 5, 12]> { 29 // CHECK: tfg.func @foo(%input: tensor<10xf32> {tfg.name = "input"}, [all …]
|
D | invalid.mlir | 1 // RUN: tfg-opt-no-passes %s --split-input-file --verify-diagnostics 8 tfg.graph { 14 tfg.func @foo(%arg0 : tensor<10xf32>) -> (tensor<10xf32>) { 19 // expected-error @+1 {{expects body to be terminated with a tfg.return, but got: tfg.Op}} 20 tfg.func @foo(%arg0 : tensor<10xf32>) -> (tensor<10xf32>) { 21 %ctl = "tfg.Op"() : () -> (!tf_type.control) 26 tfg.func @foo(%arg0 : tensor<10xf32>) { 28 %ctl = "tfg.Op"(%arg0.ctl, %arg0) : (!tf_type.control, tensor<10xf32>) -> (!tf_type.control) 29 tfg.return : () -> () 34 tfg.func @foo() { [all …]
|
D | invalid_types.mlir | 1 // RUN: tfg-opt-no-passes %s -split-input-file -verify-diagnostics | FileCheck %s 4 module attributes { tfg.type = !tf_type<variant>> } {} 10 module attributes { tfg.type = !tf_type.variant<>} {} 16 module attributes { tfg.type = !tf_type.variant<tensor<??xf32>>} {} 22 module attributes { tfg.type = !tf_type.variant<vector<3xf32>>} {} 28 module attributes { tfg.type = !tf_type.variant<tensor<vector<2xf32>>>} {} 33 module attributes { tfg.type = !tf_type.resource} {} 36 module attributes { tfg.type = !tf_type.resource<tensor<?xf32>>} {} 39 module attributes { tfg.type = !tf_type.resource<tensor<3xf32>, tensor<2xi32>>} {} 42 module attributes { tfg.type = tensor<*x!tf_type.resource<tensor<?xf32>>>} {} [all …]
|
/external/tensorflow/tensorflow/core/ir/ |
D | tf_op_names.inc | 454 add_ = StringAttr::get(getContext(), "tfg.Add"); 455 add_n_ = StringAttr::get(getContext(), "tfg.AddN"); 456 add_v2_ = StringAttr::get(getContext(), "tfg.AddV2"); 457 all_ = StringAttr::get(getContext(), "tfg.All"); 458 angle_ = StringAttr::get(getContext(), "tfg.Angle"); 459 any_ = StringAttr::get(getContext(), "tfg.Any"); 460 approximate_equal_ = StringAttr::get(getContext(), "tfg.ApproximateEqual"); 461 arg_ = StringAttr::get(getContext(), "tfg._Arg"); 462 arg_max_ = StringAttr::get(getContext(), "tfg.ArgMax"); 463 arg_min_ = StringAttr::get(getContext(), "tfg.ArgMin"); [all …]
|
/external/tensorflow/tensorflow/core/transforms/func_to_graph/tests/ |
D | simple.mlir | 1 // RUN: tfg-transforms-opt --tfg-lower-func-to-graph -verify-diagnostics --split-input-file %s | Fi… 3 // CHECK: tfg.graph #tf_type.version<producer = 34, min_consumer = 5> 4 tfg.func @_mlir_lifted_graph(%Placeholder1_0: tensor<*xf32> {tfg.lifted_value_attr = ["Placeholder1… 5 …%Placeholder2_0: tensor<*xf32> {tfg.lifted_value_attr = ["Placeholder2", 0 : index], tfg.name = "P… 6 -> (tensor<*xf32> {tfg.name = "SomeAdd3_0"}) 7 attributes {tfg.lifted_graph_version = #tf_type.version<producer = 34, min_consumer = 5>} { 21 tfg.func @_mlir_lifted_graph(%Placeholder1_0: tensor<*xf32> {tfg.lifted_value_attr = ["Placeholder1… 22 …%Placeholder2_0: tensor<*xf32> {tfg.lifted_value_attr = ["Placeholder2", 0 : index], tfg.name = "P… 23 -> (tensor<*xf32> {tfg.name = "SomeAdd3_0"}) { 33 tfg.func @_mlir_lifted_graph(%Placeholder1_0: tensor<*xf32> {tfg.lifted_value_attr = ["Unknown", 0 … [all …]
|
D | round_trip.mlir | 1 // RUN: tfg-transforms-opt -pass-pipeline='tfg-lift-graph-to-func{feeds=Placeholder1,Placeholder2 f… 2 // RUN: tfg-transforms-opt -pass-pipeline='tfg-lift-graph-to-func{fetches=SomeAdd3 control_rets=Som… 3 // RUN: tfg-transforms-opt -pass-pipeline='tfg-lift-graph-to-func{feeds=Placeholder1,Placeholder2 c… 4 // RUN: tfg-transforms-opt -pass-pipeline='tfg-lift-graph-to-func{feeds=Placeholder1,Placeholder2},… 6 // CHECK: tfg.graph #tf_type.version<producer = 34, min_consumer = 5> 7 tfg.graph #tf_type.version<producer = 34, min_consumer = 5> {
|
/external/tensorflow/tensorflow/core/transforms/region_to_functional/tests/ |
D | sink_respecialize.mlir | 1 // RUN: tfg-transforms-opt -pass-pipeline='tfg-functional-to-region,tfg.func(tfg-cf-sink),tfg-regio… 8 tfg.func @then(%a: tensor<?xi32> {tfg.name = "a"}, 9 %b: tensor<?xi32> {tfg.name = "b"}) 10 -> (tensor<?xi32> {tfg.name = "c"}) { 14 tfg.func @else(%a: tensor<?xi32> {tfg.name = "a"}, 15 %b: tensor<?xi32> {tfg.name = "b"}) 16 -> (tensor<?xi32> {tfg.name = "c"}) { 20 // CHECK-LABEL: tfg.func @test_respecialize 21 tfg.func @test_respecialize(%cond: tensor<i1> {tfg.name = "cond"}, 22 %arg: tensor<*xi32> {tfg.name = "arg"}) [all …]
|
D | while.mlir | 1 // RUN: tfg-transforms-opt --tfg-region-to-functional %s | FileCheck %s 5 tfg.graph #tf_type.version<producer = 42, min_consumer = 33> { 20 …} {body_region_attrs = #tfg.region_attrs<{sym_name = "foo", tf._a} [{tf._some_attr}] [{tf._other_a… 21 cond_region_attrs = #tfg.region_attrs<{tf._b} [{}] [{}]>, 25 // CHECK: tfg.func @[[COND_FUNC]] 26 …K-SAME: (%[[INIT_NAME]]_tfg_result_0: tensor<{{.*}}> {tfg.name = "[[INIT_NAME]]_tfg_result_0", tfg… 27 …-NEXT: %[[CONST_NAME]]_tfg_result_0: tensor<{{.*}}> {tfg.name = "[[CONST_NAME]]_tfg_result_0", tf… 28 // CHECK-NEXT: -> (tensor<{{.*}}xi1> {tfg.name = "[[TRUE_NAME:.*]]_tfg_result_0", tfg.regenerate_o… 31 // CHECK-NEXT: return(%[[TRUE]]) [%[[CTL]] {tfg.name = "[[TRUE_NAME]]_tfg_result_1"}] 33 // CHECK: tfg.func @foo [all …]
|
D | roundtrip_attrs.mlir | 1 // RUN: tfg-transforms-opt --tfg-functional-to-region --tfg-region-to-functional %s | FileCheck %s 6 // CHECK: tfg.func @case0 7 tfg.func @case0(%A: tensor<f32> {tf._attr_a, tfg.name = "A"}, 8 %B: tensor<f64> {tf._attr_b, tfg.name = "B"}, 10 -> (tensor<i32> {tf._attr_q, tfg.name = "Q"}) 16 // CHECK: tfg.func @case1 17 tfg.func @case1(%A: tensor<f32> {tf._attr_0, tfg.name = "A"}, 18 %B: tensor<f64> {tf._attr_b, tfg.name = "B"}, 20 -> (tensor<i32> {tf._attr_9, tfg.name = "Q"}) 28 tfg.func @test(%arg0: tensor<i32>) -> (tensor<i32>) { [all …]
|
D | if.mlir | 1 // RUN: tfg-transforms-opt --tfg-region-to-functional %s | FileCheck %s 6 tfg.graph #tf_type.version<producer = 42, min_consumer = 33> { 24 // CHECK: tfg.func @if_then_function 25 // CHECK-SAME: (%[[VALUE]]_tfg_result_0: tensor<[[TYPE]]> {tfg.name = "[[VALUE]]_tfg_result_0", tfg… 26 …ECK-NEXT: %[[VALUE]]_tfg_result_1: tensor<[[TYPE_0]]> {tfg.name = "[[VALUE]]_tfg_result_1", tfg.r… 27 // CHECK-NEXT: -> (tensor<[[DTYPE:.*]]> {tfg.name = "[[A:.*]]_tfg_result_0", tfg.regenerate_ou… 32 // CHECK: tfg.func @if_else_function 33 // CHECK-SAME: (%[[VALUE]]_tfg_result_0: tensor<[[TYPE]]> {tfg.name = "[[VALUE]]_tfg_result_0", tfg… 34 …ECK-NEXT: %[[VALUE]]_tfg_result_1: tensor<[[TYPE_0]]> {tfg.name = "[[VALUE]]_tfg_result_1", tfg.r… 35 // CHECK-NEXT: -> (tensor<[[DTYPE]]> {tfg.name = "[[B:.*]]_tfg_result_0", tfg.regenerate_outpu…
|
D | idempotence_arg_count.mlir | 1 …tfg-transforms-opt %s --pass-pipeline='tfg-functional-to-region,tfg-region-to-functional,tfg-funct… 7 // CHECK: tfg.func @then 8 tfg.func @then(%arg0: tensor<i32>, %arg1: tensor<i32>) -> (tensor<i32>, tensor<i32>) { 12 // CHECK: tfg.func @else 13 tfg.func @else(%arg0: tensor<i32>, %arg1: tensor<i32>) -> (tensor<i32>, tensor<i32>) { 17 // CHECK-LABEL: tfg.func @test 20 tfg.func @test(%arg0: tensor<i1>, %arg1: tensor<i32>, %arg2: tensor<i32>) -> (tensor<i32>, tensor<i… 33 // CHECK: tfg.func @then_0 34 // CHECK: tfg.func @else_1 35 // CHECK-NOT: tfg.func
|
D | idempotence_arg_reorder.mlir | 1 …tfg-transforms-opt %s --pass-pipeline='tfg-functional-to-region,tfg-region-to-functional,tfg-funct… 7 // CHECK: tfg.func @then 8 tfg.func @then(%arg0: tensor<i32>, %arg1: tensor<i64>) -> (tensor<i64>, tensor<i32>) { 12 // CHECK: tfg.func @else 13 tfg.func @else(%arg0: tensor<i32>, %arg1: tensor<i64>) -> (tensor<i64>, tensor<i32>) { 17 // CHECK-LABEL: tfg.func @test 20 tfg.func @test(%arg0: tensor<i1>, %arg1: tensor<i32>, %arg2: tensor<i64>) -> (tensor<i32>, tensor<i… 33 // CHECK: tfg.func @then_0 34 // CHECK: tfg.func @else_1 35 // CHECK-NOT: tfg.func
|
D | nested_name_lookup.mlir | 1 // RUN: tfg-transforms-opt --split-input-file --tfg-region-to-functional %s | FileCheck %s 12 tfg.func @test_for(%start: tensor<i32> {tfg.name = "start"}, 13 %end: tensor<i32> {tfg.name = "end"}, 14 %step: tensor<i32> {tfg.name = "step"}, 15 %a: tensor<i32> {tfg.name = "a"}) -> (tensor<i32>) { 31 // CHECK-SAME: tfg.name = "a" 32 // CHECK-NEXT: tfg.name = "start" 35 // CHECK-SAME: tfg.name = "a" 36 // CHECK-NEXT: tfg.name = "start" 39 // CHECK-SAME: tfg.name = "start" [all …]
|
D | duplicate_loop_name.mlir | 1 // RUN: tfg-transforms-opt --tfg-region-to-functional %s | FileCheck %s 5 // CHECK-LABEL: tfg.graph 6 tfg.graph #tf_type.version<producer = 42, min_consumer = 33> { 18 // CHECK-LABEL: tfg.func @while_cond_function 19 // CHECK-SAME: tfg.name = "init_tfg_result_0" 20 // CHECK-NEXT: tfg.name = "init_tfg_result_0_0" 23 // CHECK-LABEL: tfg.func @while_body_function 24 // CHECK-SAME: tfg.name = "init_tfg_result_0" 25 // CHECK-NEXT: tfg.name = "init_tfg_result_0_0" 27 // CHECK-SAME: tfg.name = "init_tfg_result_0_1" [all …]
|
D | func_nested_outline_first.mlir | 1 // RUN: tfg-transforms-opt --tfg-region-to-functional %s | FileCheck %s 6 tfg.graph #tf_type.version<producer = 1, min_consumer = 1> { 16 …} {region_attrs = [#tfg.region_attrs<{sym_name = "foo"} [] [{}]>]} : (tensor<i32>) -> (tensor<i32>) 18 …} {region_attrs = [#tfg.region_attrs<{sym_name = "bar"} [] [{}]>]} : (tensor<i32>) -> (tensor<i32>) 21 // CHECK-LABEL: tfg.func @bar 24 tfg.func @bar(%arg0: tensor<i32>, %arg1: tensor<i32>) -> (tensor<i32>) { 29 …} {region_attrs = [#tfg.region_attrs<{sym_name = "foo"} [] [{}]>]} : (tensor<i32>) -> (tensor<i32>) 33 // CHECK-NOT: tfg.func @bar_0 34 // CHECK: tfg.func @foo 35 // CHECK-NOT: tfg.func @bar_0
|
/external/tensorflow/tensorflow/core/transforms/consolidate_attrs/tests/ |
D | function_dropped_arg_attrs.mlir | 1 // RUN: tfg-transforms-opt %s --tfg-consolidate-attrs --split-input-file | FileCheck %s 3 // CHECK-LABEL: tfg.func @test_drop_dtype( 5 tfg.func @test_drop_dtype(%arg0: tensor<i32> {tfg.dtype = i32}) -> (tensor<i32>) { 11 // CHECK-LABEL: tfg.func @test_drop_is_ref( 13 tfg.func @test_drop_is_ref(%arg0: tensor<*x!tf_type.int32ref> {tfg.is_ref}) -> (tensor<*xi32>) { 20 // CHECK-LABEL: tfg.func @test_skip_ctl 21 // CHECK-SAME: tfg.name = "a" 22 // CHECK-NEXT: tfg.name = "b" 23 // CHECK-NEXT: tfg.name = "c" 24 tfg.func @test_skip_ctl(%a: tensor<*xi32> {tfg.name = "a"}, [all …]
|
D | materialize_function_attrs.mlir | 1 // RUN: tfg-transforms-opt --tfg-prepare-attrs-export %s | FileCheck %s 3 // CHECK-LABEL: tfg.func @test_func_attrs 6 // CHECK-SAME: tfg.handle_data = [tensor<8xi32>]} 9 // CHECK-SAME: tfg.handle_data = [tensor<4xi32>, tensor<8xf32>]} 11 tfg.func @test_func_attrs(%arg0: tensor<4xi32> {tfg.regenerate_output_shapes}, 12 … %arg1: tensor<2x!tf_type.resource<tensor<8xi32>>> {tfg.regenerate_output_shapes}) 13 -> (tensor<10xi32> {tfg.regenerate_output_shapes}, 14 tensor<20x!tf_type.resource<tensor<4xi32>, tensor<8xf32>>> {tfg.regenerate_output_shapes}) 15 attributes {tfg.regenerate_input_shapes} { 20 // CHECK-LABEL: tfg.func @test_ignore_no_regenerate( [all …]
|
D | function_input_shapes.mlir | 1 // RUN: tfg-transforms-opt %s --tfg-consolidate-attrs --split-input-file | FileCheck %s 3 // CHECK-LABEL: tfg.func @test_one 6 // CHECK: attributes {tfg.regenerate_input_shapes} 7 tfg.func @test_one(%arg0: tensor<*xi32>) -> (tensor<*xi32>) 16 // CHECK-LABEL: tfg.func @test_incompatible 20 // CHECK: attributes {tfg.regenerate_input_shapes} 21 tfg.func @test_incompatible(%arg0: tensor<*xi32>, %arg1: tensor<i32>) -> (tensor<*xi32>) 30 // CHECK-LABEL: tfg.func @test_return_type 33 // CHECK: attributes {tfg.regenerate_input_shapes} 34 tfg.func @test_return_type(%arg0: tensor<*xi32>) -> (tensor<*xi32>) [all …]
|
D | op_output_shapes.mlir | 1 // RUN: tfg-transforms-opt %s --tfg-consolidate-attrs --split-input-file | FileCheck %s 3 // CHECK-LABEL: tfg.graph 4 tfg.graph #tf_type.version<producer = 1, min_consumer = 1> { 5 // CHECK: A {tfg.regenerate_output_shapes} : () -> (tensor<4xi32>) 11 // CHECK-LABEL: tfg.graph 12 tfg.graph #tf_type.version<producer = 1, min_consumer = 1> { 13 // CHECK: %[[A:.*]], %{{.*}} = A {tfg.regenerate_output_shapes} : () -> (tensor<4xi32>) 21 // CHECK-LABEL: tfg.func @test_result_type 23 tfg.func @test_result_type(%arg0: tensor<i32>) -> (tensor<*xi32>) { 24 // CHECK: %[[A:.*]], %{{.*}} = A {tfg.regenerate_output_shapes} : () -> (tensor<4xi32>) [all …]
|
/external/tensorflow/tensorflow/core/transforms/graph_compactor/tests/ |
D | rename.mlir | 1 // RUN: tfg-transforms-opt -pass-pipeline='tfg.func(tfg-name-compress)' %s | FileCheck %s 3 // CHECK-LABEL: tfg.func @foo 4 // CHECK-SAME: tfg.name = "A" 5 // CHECK-NEXT: tfg.name = "B" 7 // CHECK-SAME: tfg.name = "C" 8 // CHECK-NEXT: tfg.name = "D" 9 tfg.func @foo(%argument0: tensor<i1> {tfg.name = "argument0"}, 10 %argument1: tensor<i1> {tfg.name = "argument1"}) 11 -> (tensor<i1> {tfg.name = "result0"}, 12 tensor<i1> {tfg.name = "result1"}) { [all …]
|
/external/tensorflow/tensorflow/core/transforms/functional_to_region/tests/ |
D | if.mlir | 1 // RUN: tfg-transforms-opt --tfg-functional-to-region %s | FileCheck %s 3 // CHECK: tfg.func @then_function 4 tfg.func @then_function(%first: tensor<*xi32> {tfg.name = "first"}, 5 %second: tensor<*xf32> {tfg.name = "second"}) 6 -> (tensor<*xf32> {tfg.dtype = f32, tfg.name = "first/Identity"}, 7 tensor<*xi32> {tfg.dtype = i32, tfg.name = "second/Identity"}) 21 {tfg.control_ret_name_1 = "first/Identity", 22 tfg.control_ret_name_2 = "second/Identity"} 26 // CHECK: tfg.func @else_function 27 tfg.func @else_function(%first: tensor<*xi32> {tfg.name = "first"}, [all …]
|
D | while.mlir | 1 // RUN: tfg-transforms-opt --tfg-functional-to-region %s | FileCheck %s 3 // CHECK: tfg.func @cond_func 4 tfg.func @cond_func(%arg: tensor<*xi32> {tfg.name = "arg"}, 5 %other: tensor<*xi32> {tfg.name = "other"}) 12 // CHECK: tfg.func @body_func 13 tfg.func @body_func(%arg: tensor<*xi32> {tfg.name = "arg"}, 14 %another: tensor<*xi32> {tfg.name = "another"}) 21 // CHECK-LABEL: tfg.graph 22 tfg.graph #tf_type.version<producer = 42, min_consumer = 33> { 33 …ttr, body_attrs = {}, body_region_attrs = #tfg.region_attrs<{sym_name = "body_func"} [{tfg.name = … [all …]
|
/external/tensorflow/tensorflow/core/transforms/cse/tests/ |
D | cse.mlir | 1 // RUN: tfg-transforms-opt -pass-pipeline='tfg.func(tfg-cse)' %s | FileCheck %s 3 // CHECK-LABEL: tfg.func @test_simple_cse 5 tfg.func @test_simple_cse(%a: tensor<i32> {tfg.name = "a0"}) 6 -> (tensor<i32> {tfg.name = "b0"}, 7 tensor<i32> {tfg.name = "b1"}) { 16 // CHECK-LABEL: tfg.func @test_cse_across_regions 19 tfg.func @test_cse_across_regions(%a: tensor<i32> {tfg.name = "a0"}, 20 %cond: tensor<i1> {tfg.name = "cond"}) 21 -> (tensor<i32> {tfg.name = "b0"}, 22 tensor<i32> {tfg.name = "b1"}) { [all …]
|
/external/tensorflow/tensorflow/core/transforms/constant_folding/tests/ |
D | simplify_case.mlir | 1 // RUN: tfg-transforms-opt -tfg-constant-folding %s | FileCheck %s 4 tfg.func @test() { 14 tfg.func generic @XTimesTwo(%x: !tf_type.tensor {tfg.name = "x", tfg.type_attr = "T"}) 15 -> (!tf_type.tensor {tfg.name = "y", tfg.type_attr = "T"}) 16 attributes {tfg.func_attrs = {T = {allowed_values = [f32, f64, i32, i64], type = "type"}}} { 25 tfg.func generic @NonZero(%x: !tf_type.tensor {tfg.name = "x", tfg.type_attr = "T"}) 26 -> (!tf_type.tensor {tfg.name = "y", tfg.type_attr = "T"}) 27 …attributes {tfg.func_attrs = {T = {allowed_values = [f32, f64, i32, i64, !tf_type.string], type = …
|