/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/ |
D | executor_island_coarsening.mlir | 1 // RUN: tf-opt %s -tf-executor-island-coarsening | FileCheck %s --dump-input=fail 9 %1:2 = tf_executor.island { 13 %2:2 = tf_executor.island(%1#1) { 22 // CHECK: %[[ISLAND:.*]], %[[ISLAND_control:.*]] = tf_executor.island { 34 %1:2 = tf_executor.island { 38 %2:2 = tf_executor.island { 47 // CHECK: %[[ISLAND:.*]], %[[ISLAND_control:.*]] = tf_executor.island { 59 %1:2 = tf_executor.island { 62 %2:2 = tf_executor.island { 65 %3:2 = tf_executor.island { [all …]
|
D | breakup-islands.mlir | 8 %island:3 = tf_executor.island { 13 tf_executor.fetch %island#0, %island#1 : tensor<*xi32>, tensor<*xi32> 20 // CHECK: %[[ADD1:.*]], %[[ADD1_control:.*]] = tf_executor.island wraps "tf.Add"(%arg0, %arg1) 21 // CHECK: %[[ADD2:.*]], %[[ADD2_control:.*]] = tf_executor.island wraps "tf.Add"(%[[ADD1]], %ar… 29 %island1:3 = tf_executor.island { 34 %island2:3 = tf_executor.island(%island1#2) { 39 %island3 = tf_executor.island { 44 %island4 = tf_executor.island(%island1#2, %island2#2) { 56 // CHECK: %[[ADD1:.*]], %[[ADD1_control:.*]] = tf_executor.island wraps "tf.Add"(%arg0, %arg1) 57 // CHECK: %[[ADD2:.*]], %[[ADD2_control:.*]] = tf_executor.island wraps "tf.Add"(%[[ADD1]], %arg… [all …]
|
D | graph_pruning.mlir | 7 // CHECK: island 8 // CHECK: island 10 %1:2 = tf_executor.island { 13 %2:2 = tf_executor.island { 24 // CHECK-NOT: tf_executor.island 26 %0 = tf_executor.island { 29 %1 = tf_executor.island { 37 // Check that an unused island that doesn't contribute to the fetch is removed. 40 // CHECK: tf_executor.island 41 // CHECK-NOT: tf_executor.island [all …]
|
D | fold-switch.mlir | 12 %8:2 = tf_executor.island { 31 %8:2 = tf_executor.island { 52 %2:2 = tf_executor.island { 56 %3:2 = tf_executor.island(%2#1) { 59 %4:2 = tf_executor.island { 63 %5:2 = tf_executor.island(%4#1) { 66 %6:2 = tf_executor.island { 71 %8:2 = tf_executor.island { 76 %10:2 = tf_executor.island { 97 %2:2 = tf_executor.island { [all …]
|
D | resource-device-inference.mlir | 11 // CHECK: tf_executor.island 12 %island = tf_executor.island { 32 tf_executor.fetch %island : !tf_executor.control 46 // CHECK: tf_executor.island 47 %island = tf_executor.island { 64 tf_executor.fetch %island : !tf_executor.control 74 // CHECK: tf_executor.island 75 %island = tf_executor.island { 86 tf_executor.fetch %island : !tf_executor.control 96 // CHECK: tf_executor.island [all …]
|
D | executor_canonicalize.mlir | 4 // Test single graph with no outputs and one island is folded away. 9 %1:2 = tf_executor.island { 24 // Test single graph with some outputs and one island is folded away. 29 %1:4 = tf_executor.island { 51 %1:4 = tf_executor.island { 53 %3:4 = tf_executor.island { 79 %1:4 = tf_executor.island { 85 %6:3 = tf_executor.island { 96 // CHECK-NEXT: %[[ISLAND_0:.*]]:3, %{{.*}} = tf_executor.island { 101 // CHECK: %[[ISLAND_1:.*]]:2, %{{.*}} = tf_executor.island { [all …]
|
D | replicate_to_island.mlir | 1 // RUN: tf-opt %s -tf-replicate-to-island | FileCheck %s --dump-input=fail 3 // Tests per replica island has same control operands as island holding 10 %3 = tf_executor.island(%1, %2) { 23 // CHECK: %[[ISLAND_0:[a-z_0-9]*]] = tf_executor.island(%[[CT_0]], %[[CT_1]]) 24 // CHECK: %[[ISLAND_1:[a-z_0-9]*]] = tf_executor.island(%[[CT_0]], %[[CT_1]]) 25 // CHECK: %[[ISLAND_2:[a-z_0-9]*]] = tf_executor.island(%[[ISLAND_0]], %[[ISLAND_1]]) 32 %0 = tf_executor.island { 54 %0 = tf_executor.island { 76 %0 = tf_executor.island { 99 // Tests unused per replica island are added as a control dependency to the [all …]
|
D | tf_executor_ops_printer.mlir | 3 // Tests printer for tf_executor.island "wraps" short form. 8 // CHECK: tf_executor.island wraps "tf.IdentityN" 9 %0:3 = tf_executor.island { 21 // CHECK: tf_executor.island 23 %0:3 = tf_executor.island { 35 // CHECK: tf_executor.island 37 %0:3 = tf_executor.island { 49 // CHECK: tf_executor.island 51 %0:3 = tf_executor.island { 63 // CHECK: tf_executor.island [all …]
|
D | side-effect-analysis-test.mlir | 15 // CHECK: tf_executor.island 16 %island:2 = tf_executor.island { 50 tf_executor.fetch %island#0 : tensor<32xf32> 70 // CHECK: tf_executor.island 71 %island = tf_executor.island { 107 tf_executor.fetch %island : !tf_executor.control 127 // CHECK: tf_executor.island 128 %island = tf_executor.island { 165 tf_executor.fetch %island : !tf_executor.control 185 // CHECK: tf_executor.island [all …]
|
D | tpu-merge-variables-with-execute.mlir | 16 // CHECK: tf_executor.island 17 %island = tf_executor.island { 39 tf_executor.fetch %island : !tf_executor.control 58 // CHECK: tf_executor.island 59 %island = tf_executor.island { 78 tf_executor.fetch %island : !tf_executor.control 105 // CHECK: tf_executor.island 106 %island:2 = tf_executor.island { 136 tf_executor.fetch %island#0 : tensor<8xf32> 153 // CHECK: tf_executor.island [all …]
|
D | tf-functional-to-executor.mlir | 12 // CHECK: %[[ISLAND_RESULT:.*]]:2, {{.*}} = tf_executor.island { 27 // CHECK: %[[CONTROL:.*]] = tf_executor.island { 36 %control = tf_executor.island { 47 // CHECK: %[[CONTROL:.*]] = tf_executor.island { 56 %control = tf_executor.island { 67 // CHECK: %[[ISLAND:.*]], %[[ISLAND_control:.*]] = tf_executor.island { 69 // CHECK: %[[ISLAND_INNER:.*]] = tf_executor.island {
|
D | tf_executor_ops_invalid.mlir | 175 // Check that a tf_executor.island parent is a graph. 178 %ctl = tf_executor.island {} 179 // expected-error@-1 {{'tf_executor.island' op expects parent op 'tf_executor.graph'}} 186 // Check that an island can't have other operands than controls. 189 "tf_executor.island"(%arg0) ({ 190 // expected-error@-1 {{'tf_executor.island' op operand #0 must be control}} 198 // Check that an island must have at least a control result. 201 "tf_executor.island"() ({ 202 // expected-error@-1 {{'tf_executor.island' op expected 1 or more results}} 210 // Check that an island region can't be empty. [all …]
|
D | functionalize-if-fail.mlir | 8 …%0 = tf_executor.island wraps "tf._TPUReplicate"() {computation = @foo, Tinputs = [], Tbroadcast_i… 16 …%0:2 = tf_executor.island wraps "tf.Const"() {device = "", dtype = "tfdtype$DT_INT32", value = den… 17 …%1:2 = tf_executor.island wraps "tf.Const"() {device = "", dtype = "tfdtype$DT_BOOL", value = dens… 19 …%3:2 = tf_executor.island wraps "tf.Add"(%2#0, %2#1) {T = "tfdtype$DT_INT32", device = ""} : (tens… 20 …%4:2 = tf_executor.island wraps "tf.Mul"(%2#1, %2#0) {T = "tfdtype$DT_INT32", device = ""} : (tens…
|
D | executor_to_control_dialect.mlir | 5 %0:2 = tf_executor.island { 10 %2 = tf_executor.island { 16 %5:2 = tf_executor.island(%4#2) { 20 %6:2 = tf_executor.island { 27 %10:2 = tf_executor.island { 31 %11:2 = tf_executor.island(%10#1) { 35 %12:2 = tf_executor.island { 67 %0:2 = tf_executor.island { 124 // Tests if empty island with just one control dependency input and output is 129 %0:2 = tf_executor.island { [all …]
|
D | tf_executor_ops_location_roundtrip.mlir | 16 // This test case exercises the "tf_executor.island wraps" syntax. 18 // tf_executor.island, tf.Identity, and tf_executor.yield). 22 // CHECK-NEXT: "tf_executor.island"() ( { 33 %1:2 = "tf_executor.island"() ( { 42 // This test cases exercises our handling of the "tf_executor.island wraps" 44 // it is incorrect to use that syntax if the island, wrapped op, and yield 49 // CHECK-NEXT: "tf_executor.island"() ( { 60 %1:2 = "tf_executor.island"() ( {
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/ |
D | breakup-islands.cc | 76 if (auto island = dyn_cast<tf_executor::IslandOp>(&item)) { in runOnOperation() local 77 BreakUpIsland(island, side_effect_analysis, &new_control_edges); in runOnOperation() 119 void PopulateEmptyIsland(tf_executor::IslandOp island) { in PopulateEmptyIsland() argument 120 OpBuilder builder(&island.GetBody(), island.GetBody().begin()); in PopulateEmptyIsland() 121 tf_executor::YieldOp yield = island.GetYield(); in PopulateEmptyIsland() 123 builder.create<TF::NoOp>(island.getLoc(), llvm::ArrayRef<mlir::Type>{}, in PopulateEmptyIsland() 128 auto identity = builder.create<TF::IdentityOp>(island.getLoc(), in PopulateEmptyIsland() 133 auto identity_n = builder.create<TF::IdentityNOp>(island.getLoc(), types, in PopulateEmptyIsland() 148 auto island = builder.create<tf_executor::IslandOp>( in CreateIsland() local 150 island.body().push_back(new Block); in CreateIsland() [all …]
|
D | executor_to_control_dialect.cc | 89 if (auto island = dyn_cast<tf_executor::IslandOp>(op)) { in runOnFunction() local 91 if (island.GetBody().without_terminator().empty() && in runOnFunction() 92 island.getNumOperands() > 1) { in runOnFunction() 97 builder.setInsertionPointToStart(&island.GetBody()); in runOnFunction() 102 for (Operation &wrapped_op : island.GetBody()) { in runOnFunction() 107 llvm::zip(island.getResults(), wrapped_op.getOperands())) in runOnFunction() 128 for (Value ctl_operand : island.getOperands()) in runOnFunction() 154 island.control().replaceAllUsesWith(ctl_sequence); in runOnFunction() 155 } else if (island.getNumOperands() > 0) { in runOnFunction() 159 assert(island.getNumOperands() == 1); in runOnFunction() [all …]
|
D | tf_functional_to_executor.cc | 76 auto island = builder.create<tf_executor::IslandOp>( in runOnFunction() local 80 ValueRange to_fetch = island.getResults(); in runOnFunction() 87 island.body().push_back(new Block); in runOnFunction() 88 island.body().front().getOperations().splice( in runOnFunction() 89 island.body().front().begin(), body.getOperations(), copy_range.begin(), in runOnFunction() 91 builder.setInsertionPointToEnd(&island.body().front()); in runOnFunction()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/ |
D | executor_island_coarsening.cc | 68 llvm::Optional<IslandOp> GetOperandCandidateToMergeWith(IslandOp island) { in GetOperandCandidateToMergeWith() argument 69 Operation* graph_op = island.getParentOp(); in GetOperandCandidateToMergeWith() 73 for (Value input : island.controlInputs()) { in GetOperandCandidateToMergeWith() 80 island.walk([graph_op, &candidate](Operation* op) { in GetOperandCandidateToMergeWith() 97 llvm::Optional<IslandOp> GetResultCandidateToMergeWith(IslandOp island) { in GetResultCandidateToMergeWith() argument 98 Operation* graph_op = island.getParentOp(); in GetResultCandidateToMergeWith() 102 for (Operation* user : island.control().getUsers()) { in GetResultCandidateToMergeWith() 109 for (Value result : island.outputs()) { in GetResultCandidateToMergeWith() 221 auto move_inner_ops = [block, new_yield_op](IslandOp island) { in MoveInnerOpsToNewIsland() argument 222 auto& island_body = island.GetBody().getOperations(); in MoveInnerOpsToNewIsland() [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/mlir2graphdef/ |
D | legalized_name.mlir | 6 …%0:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<0> : tenso… 8 …%1:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<1> : tenso… 10 …%2:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<2> : tenso… 12 …%3:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<2> : tenso… 14 …%4:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<3> : tenso… 16 …%5:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<3> : tenso… 18 …%6:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<3> : tenso…
|
D | invalid_input.mlir | 25 // CHECK: User of arg in 'main' must be in an inner op of a tf_executor.island. 31 …%0:2 = tf_executor.island wraps "tf.Identity"(%arg0) {T = "tfdtype$DT_INT32"} : (tensor<i32>) -> t… 37 // CHECK: tf_executor.island of user of arg in 'main' must have no control output users. 80 %0 = tf_executor.island { 88 // CHECK: Functions must be of a single Graph with single op Islands: tf_executor.island must perfe… 94 %0 = tf_executor.island { 104 // CHECK: Functions must be of a single Graph with single op Islands: tf_executor.island must perfe… 110 %0 = tf_executor.island { 119 // CHECK: Functions must be of a single Graph with single op Islands: tf_executor.island must perfe… 125 %0:3 = tf_executor.island { [all …]
|
D | functional-while-ops.mlir | 5 …%iter:2 = tf_executor.island wraps "tf.Placeholder.input"(%arg0) : (tensor<i32>) -> tensor<i32> lo… 6 …%val:2 = tf_executor.island wraps "tf.Placeholder.input"(%arg1) : (tensor<f32>) -> tensor<f32> loc… 9 …%2:3 = tf_executor.island wraps "tf.While"(%iter#0, %val#0) {cond = @cond, body = @body, is_statel… 10 …%3:3 = tf_executor.island wraps "tf.While"(%iter#0, %val#0) {cond = @cond, body = @body, is_statel… 18 …%0:2 = tf_executor.island wraps "tf.Const"() {value = dense<0> : tensor<i32>} : () -> tensor<i32> … 19 …%1:2 = tf_executor.island wraps "tf.Greater"(%arg0, %0#0) : (tensor<*xi32>, tensor<i32>) -> tensor… 27 …%0:2 = tf_executor.island wraps "tf.Const"() {value = dense<1> : tensor<i32>} : () -> tensor<i32> … 28 …%1:2 = tf_executor.island wraps "tf.Sub"(%arg0, %0#0) : (tensor<*xi32>, tensor<i32>) -> tensor<*xi… 29 …%2:2 = tf_executor.island wraps "tf.Add"(%arg1, %arg1) : (tensor<*xf32>, tensor<*xf32>) -> tensor<…
|
D | unique_name.mlir | 6 …%0:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<0> : tenso… 8 …%1:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<1> : tenso… 10 …%2:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<2> : tenso… 12 …%3:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<2> : tenso… 14 …%4:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<3> : tenso… 16 …%5:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<3> : tenso…
|
D | functional-if-ops.mlir | 5 %0:2 = tf_executor.island wraps "tf.Placeholder.input"(%arg0) : (tensor<f32>) -> tensor<f32> 6 %1:2 = tf_executor.island wraps "tf.Placeholder.input"(%arg1) : (tensor<f32>) -> tensor<f32> 7 %2:2 = tf_executor.island wraps "tf.Less"(%0#0, %1#0) : (tensor<f32>, tensor<f32>) -> tensor<i1> 8 …%3:2 = tf_executor.island wraps "tf.If"(%2#0, %0#0, %1#0) {else_branch = @cond_false, then_branch … 9 …%4:2 = tf_executor.island wraps "tf.If"(%2#0, %0#0, %1#0) {else_branch = @cond_false, then_branch … 17 …%0:2 = tf_executor.island wraps "tf.Add"(%arg0, %arg1): (tensor<*xf32>, tensor<*xf32>) -> tensor<*… 25 …%0:2 = tf_executor.island wraps "tf.Mul"(%arg0, %arg1) : (tensor<*xf32>, tensor<*xf32>) -> tensor<…
|
D | derived_shape_attr.mlir | 20 …%0:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<0> : tenso… 21 …%1:2 = tf_executor.island wraps "tf.Const"() {dtype = "tfdtype$DT_INT32", value = dense<0> : tenso… 22 …%2:2 = tf_executor.island wraps "tf.PlaceholderWithDefault"(%1#0) {type = i32} : (tensor<i32>) -> … 23 …%3:2 = tf_executor.island wraps "tf.PlaceholderWithDefault"(%1#0) {type = i32} : (tensor<i32>) -> … 24 …%4:2 = tf_executor.island wraps "tf.PlaceholderWithDefault"(%0#0) {type = i32} : (tensor<10xi32>) …
|