Home
last modified time | relevance | path

Searched refs:switch_node (Results 1 – 17 of 17) sorted by relevance

/external/python/pycparser/pycparser/
Dast_transforms.py13 def fix_switch_cases(switch_node): argument
64 assert isinstance(switch_node, c_ast.Switch)
65 if not isinstance(switch_node.stmt, c_ast.Compound):
66 return switch_node
70 new_compound = c_ast.Compound([], switch_node.stmt.coord)
78 for child in (switch_node.stmt.block_items or []):
95 switch_node.stmt = new_compound
96 return switch_node
/external/tensorflow/tensorflow/compiler/jit/
Dshape_inference_test.cc89 auto switch_node = in TEST() local
92 switch_node.output_false); in TEST()
94 switch_node.output_true); in TEST()
143 auto switch_node = in TEST() local
146 switch_node.output_false); in TEST()
148 switch_node.output_true); in TEST()
Dmark_for_compilation_pass.cc1078 const Node* switch_node = (*it)->src(); in IsIdentityDrivingConstsInLoop() local
1082 TF_RETURN_IF_ERROR(switch_node->input_node(1, &maybe_loop_cond)); in IsIdentityDrivingConstsInLoop()
Dmark_for_compilation_pass_test.cc1682 ops::Switch switch_node(root.WithOpName("switch"), value, loop_cond); in TEST() local
1685 ops::Identity(root.WithOpName("identity"), switch_node.output_true); in TEST()
/external/tensorflow/tensorflow/compiler/tf2xla/
Dfunctionalize_while.cc194 node_map[arg.switch_node->id()] = arg_node; in BuildLoopBody()
199 squash_src_outputs[arg.switch_node->id()] = true; in BuildLoopBody()
348 if (arg.switch_node != nullptr) { in FunctionalizeLoop()
352 arg.switch_node = edge->dst(); in FunctionalizeLoop()
355 if (arg.switch_node == nullptr) { in FunctionalizeLoop()
366 for (const Edge* edge : arg.switch_node->out_edges()) { in FunctionalizeLoop()
383 FormatNodeForError(*arg.switch_node)); in FunctionalizeLoop()
389 FormatNodeForError(*arg.switch_node), in FunctionalizeLoop()
Dfunctionalize_cond.cc124 Status GetSwitchPredicate(const Node& switch_node, OutputTensor* pred) { in GetSwitchPredicate() argument
126 TF_RETURN_IF_ERROR(switch_node.input_edge(1, &pred_edge)); in GetSwitchPredicate()
136 Status GetSwitchValue(const Node& switch_node, OutputTensor* val) { in GetSwitchValue() argument
138 TF_RETURN_IF_ERROR(switch_node.input_edge(0, &val_edge)); in GetSwitchValue()
428 for (Node* switch_node : switches_) { in BuildArgumentNodes()
430 TF_RETURN_IF_ERROR(switch_node->input_edge(0, &e)); in BuildArgumentNodes()
436 cond_arg_nodes_.at(input_index.at(key)).switches.push_back(switch_node); in BuildArgumentNodes()
510 Node* switch_node; in AddSwitchNodeAlongEdge() local
518 .Finalize(graph, &switch_node)); in AddSwitchNodeAlongEdge()
519 state_map_->ResetCondId(switch_node, state_map_->LookupCondId(src)); in AddSwitchNodeAlongEdge()
[all …]
Dfunctionalize_control_flow_util.h43 Node* switch_node = nullptr; member
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dloop_optimizer.cc168 NodeDef* switch_node = nullptr; in HandleConst() local
171 switch_node = node; in HandleConst()
175 if (!switch_node) { in HandleConst()
179 string switch_output = StrCat(switch_node->name(), ":1"); in HandleConst()
598 const NodeDef& switch_node, const NodeMap& node_map, in CheckForDeadFanout() argument
603 GraphView::InputPort switch_loopcond_port(&switch_node, 1); in CheckForDeadFanout()
610 << " switch_node=" << switch_node.name() in CheckForDeadFanout()
619 GraphView::InputPort switch_input_port(&switch_node, 0); in CheckForDeadFanout()
631 << " switch_node=" << switch_node.name(); in CheckForDeadFanout()
687 << "\n| switch_node : " << switch_node.name() in CheckForDeadFanout()
[all …]
Dgeneric_layout_optimizer_transposer_test.cc1808 auto* switch_node = context.graph_view->GetNode("switch"); in TEST_F() local
1809 ASSERT_NE(switch_node, nullptr); in TEST_F()
1810 ASSERT_EQ(switch_node->NumRegularFanins(), 2); in TEST_F()
1811 VerifyRegularFaninMatch(switch_node, 0, input_transpose_node->GetName(), 0); in TEST_F()
1812 VerifyRegularFaninMatch(switch_node, 1, "ctrl", 0); in TEST_F()
1818 VerifyRegularFaninMatch(output_transpose_node1, 0, switch_node->GetName(), 0); in TEST_F()
1824 VerifyRegularFaninMatch(output_transpose_node2, 0, switch_node->GetName(), 1); in TEST_F()
Dlayout_optimizer_test.cc1117 auto switch_node = node_map.GetNode("switch"); in TEST_F() local
1118 EXPECT_EQ(switch_node->input(0), "Conv2D"); in TEST_F()
1119 EXPECT_EQ(switch_node->input(1), "ctrl"); in TEST_F()
/external/tensorflow/tensorflow/core/common_runtime/
Dlower_while_op_test.cc247 const Node* switch_node = nullptr; in TEST() local
251 switch_node = consumer; in TEST()
258 for (const Node* consumer : switch_node->out_nodes()) { in TEST()
368 const Node* switch_node = nullptr; in TEST() local
372 switch_node = consumer; in TEST()
379 for (const Node* consumer : switch_node->out_nodes()) { in TEST()
Dlower_while_op.cc330 Node* switch_node; in CreateSwitchNodes() local
341 .Finalize(graph_, &switch_node)); in CreateSwitchNodes()
342 switch_nodes_.emplace_back(switch_node); in CreateSwitchNodes()
Dquantize_training.cc435 Node* switch_node; in MakeInitializedEMAVariable() local
439 .Finalize(graph, &switch_node)); in MakeInitializedEMAVariable()
440 NodeBuilder::NodeOut output_false = NodeBuilder::NodeOut(switch_node, 0); in MakeInitializedEMAVariable()
441 NodeBuilder::NodeOut output_true = NodeBuilder::NodeOut(switch_node, 1); in MakeInitializedEMAVariable()
Ddirect_session_test.cc1646 Node* switch_node = test::graph::Switch(&g, bool_const, bool_const); in TEST() local
1647 Node* fourth_identity = test::graph::Identity(&g, switch_node, 1); in TEST()
1658 Status s = session->PRunSetup({switch_node->name() + ":1"}, in TEST()
1669 s = session->PRun(handle, {{switch_node->name() + ":1", bool_value}}, in TEST()
/external/tensorflow/tensorflow/core/tpu/graph_rewrite/
Dhost_training_loop_optimization_util.cc285 auto switch_node = e_cond->dst(); in FindLoopExitNodes() local
287 for (const auto e_switch : switch_node->out_edges()) { in FindLoopExitNodes()
488 TF_ASSIGN_OR_RETURN(Node * switch_node, in AddReshardOp()
492 TF_RETURN_IF_ERROR(AddNoOpAfterLastIteration(graph, switch_node, in AddReshardOp()
497 graph, switch_node, &before_loop_iteration_node)); in AddReshardOp()
/external/tensorflow/tensorflow/core/graph/
Dgraph_partition.cc496 Node* switch_node = nullptr; member
550 Node* switch_node = AddControlSwitch(merge, loop_cond, device_name, in AddControlLoop() local
554 AddControlNext({switch_node, 1}, device_name, bopts.WithName(next_name)); in AddControlLoop()
560 AddControlFlowInfo(switch_node, src, cf_info); in AddControlLoop()
569 loop->switch_node = switch_node; in AddControlLoop()
Dgraph_partition_test.cc650 Switch switch_node(scope, merge.output, loop_cond); in TEST() local
651 Identity identity(scope, switch_node.output_true); in TEST()
654 switch_node.output_false); in TEST()
663 enter, merge.output, cv, loop_cond, switch_node.output_false, in TEST()