/external/tensorflow/tensorflow/core/grappler/optimizers/ |
D | layout_optimizer_test.cc | 234 NodeMap node_map(&output); in TEST_F() local 236 auto input_sizes_node = node_map.GetNode(input_name); in TEST_F() 238 auto conv2d_backprop_node = node_map.GetNode("Conv2DBackpropInput"); in TEST_F() 247 TensorShape filter_shape = GetAttrShape(*node_map.GetNode("Filter")); in TEST_F() 269 NodeMap node_map(&output); in TEST_F() local 270 auto conv2d_backprop_node = node_map.GetNode("Conv2DBackpropInput"); in TEST_F() 274 auto input_sizes_node = node_map.GetNode( in TEST_F() 290 NodeMap node_map(&output); in TEST_F() local 291 EXPECT_TRUE(node_map.GetNode("Conv2D-0-TransposeNHWCToNCHW-LayoutOptimizer")); in TEST_F() 303 NodeMap node_map(&output); in TEST_F() local [all …]
|
D | scoped_allocator_optimizer.cc | 126 Status GetInputs(NodeMap* node_map, const std::vector<NodeDef*>& ops, in GetInputs() argument 140 inode = node_map->GetNode(input_name); in GetInputs() 162 void RemoveNode(NodeDef* nd, GraphDef* graph, NodeMap* node_map) { in RemoveNode() argument 163 node_map->RemoveNode(nd->name()); in RemoveNode() 180 NodeDef* to_node, NodeMap* node_map) { in RemoveEdge() argument 181 if (node_map) { in RemoveEdge() 182 node_map->RemoveOutput(from_node_name, to_node->name()); in RemoveEdge() 258 NodeMap* node_map) { in ClearInternalControlInputs() argument 269 TF_CHECK_OK(RemoveEdge(input_name, input_node_name, n, node_map)); in ClearInternalControlInputs() 279 Status AnalyzeInputs(ScopedAllocatorOptimizer* sa_opti, NodeMap* node_map, in AnalyzeInputs() argument [all …]
|
D | model_pruner.cc | 185 const NodeMap& node_map, const std::vector<string>& terminal_nodes, in IdentityNTerminalPorts() argument 196 NodeDef* node = node_map.GetNode(terminal_node); in IdentityNTerminalPorts() 209 NodeDef* curr_node = node_map.GetNode(curr); in IdentityNTerminalPorts() 258 GraphDef* graph, NodeMap* node_map) { in NewIdentityFromIdentityN() argument 263 if (node_map->NodeExists(new_node_name)) { in NewIdentityFromIdentityN() 275 node_map->AddNode(new_node->name(), new_node); in NewIdentityFromIdentityN() 276 node_map->AddOutput(NodeName(new_node->input(0)), new_node->name()); in NewIdentityFromIdentityN() 283 NodeMap* node_map) { in RewriteIdentityNAndInputsOutputs() argument 302 string identity = NewIdentityFromIdentityN(i, *node, graph, node_map); in RewriteIdentityNAndInputsOutputs() 314 for (NodeDef* output : node_map->GetOutputs(node->name())) { in RewriteIdentityNAndInputsOutputs() [all …]
|
D | graph_optimizer_stage_test.cc | 92 NodeMap node_map(&graph); in TEST_F() local 96 /*node_map*/ &node_map, in TEST_F() 121 NodeMap node_map(&graph); in TEST_F() local 125 /*node_map*/ &node_map, in TEST_F() 154 NodeMap node_map(&item.graph); in TEST_F() local 159 /*node_map*/ &node_map, in TEST_F() 196 NodeMap node_map(&item.graph); in TEST_F() local 201 /*node_map*/ &node_map, in TEST_F()
|
D | arithmetic_optimizer.cc | 113 GraphDef* graph, NodeMap* node_map) { in MaybeAddControlInput() argument 123 ConstantFolding::AddControlDependency(new_input, graph, node_map); in MaybeAddControlInput() 125 node_map->AddOutput(NodeName(new_input), node->name()); in MaybeAddControlInput() 135 const NodeDef& node, const NodeMap& node_map, in GetTailOfValuePreservingChain() argument 139 IsValuePreserving(node) && NumNonControlOutputs(node, node_map) == 1; in GetTailOfValuePreservingChain() 141 return GetTailOfChain(node, node_map, /*follow_control_input=*/false, in GetTailOfValuePreservingChain() 146 const NodeDef& node, const NodeMap& node_map, in GetTailOfIdempotentChain() argument 150 IsIdempotent(node) && NumNonControlOutputs(node, node_map) == 1; in GetTailOfIdempotentChain() 152 return GetTailOfChain(node, node_map, /*follow_control_input=*/false, in GetTailOfIdempotentChain() 226 ctx().node_map->AddOutput(NodeName(src->input(i)), in ForwardControlDependencies() [all …]
|
D | arithmetic_optimizer_test.cc | 118 NodeMap node_map(&output); in TEST_F() local 120 const NodeDef* new_c1 = node_map.GetNode("c1"); in TEST_F() 123 const NodeDef* new_div = node_map.GetNode("div"); in TEST_F() 158 NodeMap node_map(&output); in TEST_F() local 161 const NodeDef* new_div = node_map.GetNode("div"); in TEST_F() 190 NodeMap node_map(&output); in TEST_F() local 193 const NodeDef* new_c1 = node_map.GetNode("c1"); in TEST_F() 195 const NodeDef* new_c2 = node_map.GetNode("c2"); in TEST_F() 197 const NodeDef* new_mul1 = node_map.GetNode("mul1"); in TEST_F() 202 const NodeDef* new_div1 = node_map.GetNode("div1"); in TEST_F() [all …]
|
D | graph_optimizer_stage.cc | 34 NodeDef* node_by_name = ctx.node_map->GetNode(node_name); in GetInputNode() 77 CHECK(!ctx.node_map->NodeExists(name)) in AddCopyNode() 82 ctx.node_map->AddNode(name, new_node); in AddCopyNode() 87 CHECK(!ctx.node_map->NodeExists(name)) in AddEmptyNode() 91 ctx.node_map->AddNode(name, new_node); in AddEmptyNode()
|
D | scoped_allocator_optimizer_test.cc | 127 NodeMap node_map(&optimized_graph); in TEST_F() local 128 NodeDef* nd = node_map.GetNode("scoped_allocator_1_1"); in TEST_F() 131 auto& nd_set = node_map.GetOutputs(nd->name()); in TEST_F() 141 auto& nd_set = node_map.GetOutputs("scoped_allocator_concat_1_1"); in TEST_F() 148 auto& nd_set = node_map.GetOutputs("scoped_allocator_1_1_Abs"); in TEST_F() 155 auto& nd_set = node_map.GetOutputs("scoped_allocator_split_1_1"); in TEST_F()
|
D | memory_optimizer.cc | 72 const NodeMap& node_map, const GraphDef* graph, in FindCandidateRecomputeNodes() argument 81 for (const NodeDef* output : node_map.GetOutputs(node.name())) { in FindCandidateRecomputeNodes() 95 const NodeDef* input_node = node_map.GetNode(input_name); in FindCandidateRecomputeNodes() 109 void connected_subgraph(const NodeMap& node_map, bool collect_inputs, in connected_subgraph() argument 128 const NodeDef* input_node = node_map.GetNode(input_name_raw); in connected_subgraph() 136 for (const NodeDef* output : node_map.GetOutputs(current_node->name())) { in connected_subgraph() 152 const GraphDef* graph, const NodeMap& node_map, in GetOpGroupsToRecompute() argument 158 FindCandidateRecomputeNodes(node_map, graph, should_recompute, is_target); in GetOpGroupsToRecompute() 169 connected_subgraph(node_map, in GetOpGroupsToRecompute() 177 for (NodeDef* output : node_map.GetOutputs(recompute_node->name())) { in GetOpGroupsToRecompute() [all …]
|
D | graph_optimizer_stage.h | 51 GraphProperties* graph_properties, NodeMap* node_map, in GraphOptimizerContext() 57 node_map(node_map), in GraphOptimizerContext() 64 NodeMap* node_map; member 211 while (ctx_.node_map->NodeExists(node_name)) { in UniqueNodeName()
|
/external/tensorflow/tensorflow/tools/graph_transforms/ |
D | fuse_quantized_convolution.cc | 37 std::map<string, const NodeDef*> node_map; in FuseQuantizedConvolutionAndRequantize() local 38 MapNamesToNodes(input_graph_def, &node_map); in FuseQuantizedConvolutionAndRequantize() 55 [&node_map](const NodeMatch& match, const std::set<string>& input_nodes, in FuseQuantizedConvolutionAndRequantize() 91 const NodeDef *in_requantize = node_map[node_map[ in FuseQuantizedConvolutionAndRequantize() 108 node_map[in_requantize->input(0)]->op()) != signed_ops.end(); in FuseQuantizedConvolutionAndRequantize() 146 node_map.clear(); in FuseQuantizedConvolutionAndRequantize() 147 MapNamesToNodes(replaced_graph_def, &node_map); in FuseQuantizedConvolutionAndRequantize() 148 for (auto& node_pair : node_map) { in FuseQuantizedConvolutionAndRequantize() 157 string input_op = node_map[NodeNameFromInput(node->input(0))]->op(); in FuseQuantizedConvolutionAndRequantize() 160 NodeDef *bias_node = const_cast<NodeDef*>(node_map[NodeNameFromInput( in FuseQuantizedConvolutionAndRequantize() [all …]
|
D | fold_constants_test.cc | 253 std::map<string, const NodeDef*> node_map; in TestReplaceSendRecvs() local 254 graph_transforms::MapNamesToNodes(result_graph_def, &node_map); in TestReplaceSendRecvs() 255 EXPECT_EQ(1, node_map.count("original_recv")); in TestReplaceSendRecvs() 256 EXPECT_EQ(1, node_map.count("a_const")); in TestReplaceSendRecvs() 257 EXPECT_EQ(1, node_map.count("placeholder")); in TestReplaceSendRecvs() 258 EXPECT_EQ(1, node_map.count("original_send")); in TestReplaceSendRecvs() 259 EXPECT_EQ(0, node_map.count("_recv_placeholder_0")); in TestReplaceSendRecvs() 260 EXPECT_EQ(0, node_map.count("new_send")); in TestReplaceSendRecvs() 287 std::map<string, const NodeDef*> node_map; in TestReplaceSendRecvsPrefixNames() local 288 graph_transforms::MapNamesToNodes(result_graph_def, &node_map); in TestReplaceSendRecvsPrefixNames() [all …]
|
D | quantize_nodes_test.cc | 550 std::map<string, const NodeDef*> node_map; in TestRemoveRedundantQuantization() local 551 MapNamesToNodes(removed_graph_def, &node_map); in TestRemoveRedundantQuantization() 552 EXPECT_EQ(1, node_map.count("final_dequantize")); in TestRemoveRedundantQuantization() 553 EXPECT_EQ("quantized_op", node_map.at("final_dequantize")->input(0)); in TestRemoveRedundantQuantization() 649 std::map<string, const NodeDef*> node_map; in TestRemoveRedundantQuantizationWithBiasAdd() local 650 MapNamesToNodes(removed_graph_def, &node_map); in TestRemoveRedundantQuantizationWithBiasAdd() 651 EXPECT_EQ(1, node_map.count("final_dequantize")); in TestRemoveRedundantQuantizationWithBiasAdd() 652 EXPECT_EQ("requantize_op", node_map.at("final_dequantize")->input(0)); in TestRemoveRedundantQuantizationWithBiasAdd() 811 std::map<string, const NodeDef*> node_map; in TestQuantizePlaceholders() local 812 MapNamesToNodes(quantized_graph_def, &node_map); in TestQuantizePlaceholders() [all …]
|
D | freeze_requantization_ranges_test.cc | 126 std::map<string, const NodeDef*> node_map; in TestFreezeRequantizationRanges() local 127 MapNamesToNodes(frozen_graph_def, &node_map); in TestFreezeRequantizationRanges() 128 EXPECT_EQ(0, node_map.count("requantization_range_op")); in TestFreezeRequantizationRanges() 129 EXPECT_EQ(1, node_map.count("requantize_op")); in TestFreezeRequantizationRanges() 131 NodeNameFromInput(node_map.at("requantize_op")->input(3)); in TestFreezeRequantizationRanges() 132 ASSERT_EQ(1, node_map.count(min_input)); in TestFreezeRequantizationRanges() 133 EXPECT_EQ("Const", node_map.at(min_input)->op()); in TestFreezeRequantizationRanges() 135 NodeNameFromInput(node_map.at("requantize_op")->input(4)); in TestFreezeRequantizationRanges() 136 ASSERT_EQ(1, node_map.count(max_input)); in TestFreezeRequantizationRanges() 137 EXPECT_EQ("Const", node_map.at(max_input)->op()); in TestFreezeRequantizationRanges()
|
D | transform_utils_test.cc | 54 std::map<string, const NodeDef*> node_map; in TestMapNamesToNodes() local 55 MapNamesToNodes(graph_def, &node_map); in TestMapNamesToNodes() 57 EXPECT_EQ(1, node_map.count("a")); in TestMapNamesToNodes() 58 EXPECT_EQ(1, node_map.count("b")); in TestMapNamesToNodes() 59 EXPECT_EQ(1, node_map.count("add")); in TestMapNamesToNodes() 60 EXPECT_EQ(1, node_map.count("placeholder")); in TestMapNamesToNodes() 61 EXPECT_EQ(1, node_map.count("output")); in TestMapNamesToNodes() 62 EXPECT_EQ(0, node_map.count("no_such_node")); in TestMapNamesToNodes() 250 std::map<string, const NodeDef*> node_map; in TestFilterGraphDef() local 251 MapNamesToNodes(result_graph_def, &node_map); in TestFilterGraphDef() [all …]
|
/external/tensorflow/tensorflow/compiler/tf2xla/ |
D | functionalize_while.cc | 99 std::vector<Node*>* node_map, Graph* output) { in CopySubgraph() argument 119 if ((*node_map)[src->id()] == nullptr) { in CopySubgraph() 120 (*node_map)[src->id()] = output->CopyNode(src); in CopySubgraph() 123 Node* src_copy = (*node_map)[e->src()->id()]; in CopySubgraph() 127 Node* dst_copy = (*node_map)[e->dst()->id()]; in CopySubgraph() 152 std::vector<Node*> node_map(graph.num_node_ids(), nullptr); in BuildLoopCondition() local 162 node_map[arg.enter->id()] = arg_node; in BuildLoopCondition() 164 node_map[arg.merge->id()] = arg_node; in BuildLoopCondition() 170 TF_ASSIGN_OR_RETURN(node_map[frame->loop_cond->id()], in BuildLoopCondition() 177 &node_map, output); in BuildLoopCondition() [all …]
|
D | tf2xla.cc | 66 Status AddArgNodes(Graph* graph, const NodeMap& node_map, in AddArgNodes() argument 76 auto node_it = node_map.find(remap_it->second); in AddArgNodes() 77 if (node_it == node_map.end()) { in AddArgNodes() 122 Status AddRetvalNodes(Graph* graph, const NodeMap& node_map, in AddRetvalNodes() argument 127 auto it = node_map.find(id.node_name()); in AddRetvalNodes() 128 if (it == node_map.end()) { in AddRetvalNodes() 158 NodeMap node_map; in RewriteAndPruneGraph() local 160 node_map[n->name()] = n; in RewriteAndPruneGraph() 163 AddArgNodes(graph, node_map, config.feed(), feed_remapping)); in RewriteAndPruneGraph() 166 AddRetvalNodes(graph, node_map, config.fetch(), &retval_nodes)); in RewriteAndPruneGraph()
|
/external/tensorflow/tensorflow/core/grappler/utils/ |
D | grappler_test_test.cc | 60 NodeMap node_map(&graph); in TEST_F() local 62 EXPECT_TRUE(IsNodesDirectlyConnected(node_map, "a", "Add_1", 0)); in TEST_F() 63 EXPECT_TRUE(IsNodesDirectlyConnected(node_map, "b", "Add_1", 1)); in TEST_F() 64 EXPECT_FALSE(IsNodesDirectlyConnected(node_map, "a", "Add_2", 0)); in TEST_F() 65 EXPECT_TRUE(IsNodesDirectlyConnected(node_map, "b", "Add_2", 1)); in TEST_F()
|
D | colocation.cc | 78 NodeMap node_map(graph); in ReassignColocation() local 101 NodeDef* node = node_map.GetNode(pair.first); in ReassignColocation() 112 NodeDef* node = node_map.GetNode(pair.first); in ReassignColocation()
|
/external/tensorflow/tensorflow/core/common_runtime/ |
D | constant_folding.cc | 359 Node* n, std::unordered_map<Node*, std::vector<Node*>>* node_map, in AddNodeToConstantGraph() argument 361 std::vector<Node*>& added = (*node_map)[n]; in AddNodeToConstantGraph() 367 auto it = node_map->find(in); in AddNodeToConstantGraph() 368 CHECK(it != node_map->end()) in AddNodeToConstantGraph() 395 std::unordered_map<Node*, std::vector<Node*>>* node_map, in AddShapeNodeToConstantGraph() argument 397 std::vector<Node*>& added = (*node_map)[n]; in AddShapeNodeToConstantGraph() 425 std::unordered_map<Node*, std::vector<Node*>> node_map; in GetConstantGraph() local 426 node_map[orig_graph->source_node()] = {constant_graph->source_node()}; in GetConstantGraph() 427 node_map[orig_graph->sink_node()] = {constant_graph->sink_node()}; in GetConstantGraph() 430 AddNodeToConstantGraph(n, &node_map, constant_graph); in GetConstantGraph() [all …]
|
/external/tensorflow/tensorflow/compiler/jit/ |
D | extract_outside_compilation_pass.cc | 510 std::map<const Node*, Node*> node_map; in ConstructHostGraph() local 511 node_map[host_fbody->graph->source_node()] = host_graph.source_node(); in ConstructHostGraph() 512 node_map[host_fbody->graph->sink_node()] = host_graph.sink_node(); in ConstructHostGraph() 522 if (node_map.find(n) != node_map.end()) { in ConstructHostGraph() 524 copy = node_map.at(n); in ConstructHostGraph() 528 node_map[n] = copy; in ConstructHostGraph() 538 node_map[n] = copy; in ConstructHostGraph() 544 if (node_map.find(e->src()) == node_map.end()) { in ConstructHostGraph() 549 host_graph.AddEdge(node_map[e->src()], e->src_output(), copy, in ConstructHostGraph() 632 std::map<const Node*, Node*> node_map; in ExpandHostGraphIntoMainGraph() local [all …]
|
/external/v8/src/compiler/ |
D | loop-peeling.cc | 108 NodeMarker<size_t> node_map; member 113 : node_map(graph, static_cast<uint32_t>(max)), pairs(p) {} in Peeling() 116 if (node_map.Get(node) == 0) return node; in map() 117 return pairs->at(node_map.Get(node)); in map() 121 node_map.Set(original, 1 + pairs->size()); in Insert() 148 Node* copy = pairs->at(node_map.Get(original)); in CopyNodes() 155 bool Marked(Node* node) { return node_map.Get(node) > 0; } in Marked()
|
/external/tensorflow/tensorflow/core/grappler/ |
D | utils_test.cc | 248 NodeMap node_map(&graph); in TEST_F() local 251 NodeDef* tail = GetTailOfChain(graph.node(5), node_map, in TEST_F() 258 return node.op() == "Neg" && NumNonControlOutputs(node, node_map) == 1; in TEST_F() 261 GetTailOfChain(graph.node(5), node_map, in TEST_F() 268 tail = GetTailOfChain(graph.node(7), node_map, in TEST_F() 275 tail = GetTailOfChain(graph.node(7), node_map, in TEST_F() 350 NodeMap node_map(&graph); in TEST_F() local 352 const NodeDef* add_node = node_map.GetNode("add"); in TEST_F() 358 EXPECT_EQ(NumNonControlOutputs(*add_node, node_map), 2); in TEST_F() 360 EXPECT_EQ(NumNonControlDataOutputs(*add_node, node_map), 1); in TEST_F()
|
/external/syzkaller/vendor/golang.org/x/sys/unix/ |
D | mksysctl_openbsd.pl | 136 my %node_map = ( 162 if (exists $node_map{$nodename}) { 164 $ctlname = $node_map{$nodename};
|
/external/tensorflow/tensorflow/python/tools/ |
D | optimize_for_inference_lib.py | 134 node_map = {} 136 if node.name not in node_map: 137 node_map[node.name] = node 143 if input_node_name not in node_map: 157 def node_from_map(node_map, name): argument 171 if stripped_name not in node_map: 173 return node_map[stripped_name]
|