/external/tensorflow/tensorflow/compiler/jit/ |
D | rearrange_function_argument_pass_test.cc | 139 const Node *input_node; in TEST() local 140 TF_CHECK_OK(if_node->input_node(1, &input_node)); in TEST() 141 EXPECT_EQ(input_node->name(), "arg1"); in TEST() 142 TF_CHECK_OK(if_node->input_node(2, &input_node)); in TEST() 143 EXPECT_EQ(input_node->name(), "arg0"); in TEST() 146 TF_CHECK_OK(ret0_node->input_node(0, &input_node)); in TEST() 147 EXPECT_EQ(input_node->name(), "if"); in TEST() 150 TF_CHECK_OK(ret1_node->input_node(0, &input_node)); in TEST() 151 EXPECT_EQ(input_node->name(), "arg0"); in TEST() 156 TF_CHECK_OK(while_node->input_node(0, &input_node)); in TEST() [all …]
|
D | shape_inference.cc | 121 TF_RETURN_IF_ERROR(n->input_node(0, &var_node)); in PropagateShapes() 181 TF_RETURN_IF_ERROR(node->input_node(0, &node)); in PropagateShapes() 185 node->input_node(0, &switch_input).ok() && in PropagateShapes() 191 const Node* input_node; in PropagateShapes() local 192 if (n->input_node(i, &input_node).ok()) { in PropagateShapes()
|
/external/tensorflow/tensorflow/tools/graph_transforms/ |
D | obfuscate_names.cc | 47 for (const NodeDef& input_node : input_graph_def.node()) { in ObfuscateNames() local 48 const string& old_name = input_node.name(); in ObfuscateNames() 72 for (const NodeDef& input_node : input_graph_def.node()) { in ObfuscateNames() local 74 *node = input_node; in ObfuscateNames() 75 const string& old_name = input_node.name(); in ObfuscateNames() 78 for (const string& input_name : input_node.input()) { in ObfuscateNames()
|
D | remove_nodes.cc | 81 const NodeDef& input_node = match.inputs[0].node; in RemoveNodes() local 82 string target_name = input_node.name(); in RemoveNodes() 94 "^" + input_node.name(); in RemoveNodes() 95 new_nodes->push_back(input_node); in RemoveNodes()
|
D | fold_batch_norms.cc | 54 const NodeDef& input_node = match.inputs[0].inputs[0].node; in FoldBatchNorms() local 63 {mul_node, conv_node, input_node, weights_node, in FoldBatchNorms() 108 new_nodes->push_back(input_node); in FoldBatchNorms()
|
D | flatten_atrous.cc | 57 const NodeDef& input_node = match.inputs[0].inputs[0].inputs[0].node; in FlattenAtrousConv() local 112 AddNodeInput(input_node.name(), &flattened_conv_node); in FlattenAtrousConv() 126 new_nodes->push_back(input_node); in FlattenAtrousConv()
|
D | rename_node.cc | 43 for (const NodeDef& input_node : input_graph_def.node()) { in RenameNode() local 45 *node = input_node; in RenameNode()
|
D | transform_utils.cc | 351 const NodeDef& input_node = *(node_map_[input_node_name]); in DoesOpTypeMatch() local 355 if (!DoesOpTypeMatch(input_node, input_pattern, previously_matched_nodes, in DoesOpTypeMatch() 388 for (const NodeDef& input_node : input_graph_def.node()) { in ReplaceMatchingOpTypes() local 389 if (matches_by_head_name.count(input_node.name())) { in ReplaceMatchingOpTypes() 392 const NodeMatch* match = matches_by_head_name[input_node.name()]; in ReplaceMatchingOpTypes() 464 } else if (!matched_nodes.count(input_node.name())) { in ReplaceMatchingOpTypes() 467 *added_node = input_node; in ReplaceMatchingOpTypes() 564 string input_node = NodeNameFromInput(input); in FindInvalidInputs() local 565 if (!node_map.count(input_node)) { in FindInvalidInputs() 566 invalid_inputs->push_back({node.name(), input_node}); in FindInvalidInputs()
|
/external/tensorflow/tensorflow/compiler/tf2tensorrt/convert/ |
D | convert_graph.cc | 121 bool ShallKeepControlEdgeFrom(const Node* input_node) { in ShallKeepControlEdgeFrom() argument 122 if (!input_node) { in ShallKeepControlEdgeFrom() 126 return input_node->type_string() != "Const"; in ShallKeepControlEdgeFrom() 170 auto input_node = edge->src(); in GetEngineInfo() local 171 if (input_node->IsSource() || segment_nodes.count(input_node)) { in GetEngineInfo() 175 if (ShallKeepControlEdgeFrom(input_node)) { in GetEngineInfo() 177 info->connections.emplace_back(input_node->name(), input_node->id(), in GetEngineInfo() 181 } else if (input_node->type_string() == "Const") { in GetEngineInfo() 190 if (!added_const_nodes.insert(input_node).second) { in GetEngineInfo() 194 VLOG(1) << "Adding const node " << input_node->name(); in GetEngineInfo() [all …]
|
/external/tensorflow/tensorflow/core/grappler/optimizers/data/ |
D | auto_shard.cc | 427 const NodeDef* input_node = graph_utils::GetInputNode(*node, *graph, 0); in FindFuncAndTensorSliceDataset() local 428 if (input_node->op() == kTensorSliceDatasetOpName || in FindFuncAndTensorSliceDataset() 429 input_node->op() == kTensorDatasetOpName) { in FindFuncAndTensorSliceDataset() 431 graph_utils::GetInputNode(*input_node, *graph, 0); in FindFuncAndTensorSliceDataset() 444 const NodeDef* input_node = graph_utils::GetInputNode(*node, *graph, 0); in FindFuncAndTensorSliceDataset() local 445 return FindFuncAndTensorSliceDataset(input_node, num_workers, index, flib, in FindFuncAndTensorSliceDataset() 458 const NodeDef* input_node = graph_utils::GetInputNode(node, *graph, 0); in RecursivelyHandleOp() local 459 return RecursivelyHandleOp(*input_node, num_workers, index, flib, graph, in RecursivelyHandleOp() 470 const NodeDef* input_node = graph_utils::GetInputNode(node, *graph, i); in RecursivelyHandleOp() local 471 TF_RETURN_IF_ERROR(RecursivelyHandleOp(*input_node, num_workers, index, in RecursivelyHandleOp() [all …]
|
D | slack.cc | 91 NodeDef* input_node = graph_utils::GetInputNode(*dataset_node, graph, 0); in RecursivelyHandleOp() local 92 return RecursivelyHandleOp(graph, input_node); in RecursivelyHandleOp() 97 NodeDef* input_node = graph_utils::GetInputNode(*dataset_node, graph, i); in RecursivelyHandleOp() local 98 TF_RETURN_IF_ERROR(RecursivelyHandleOp(graph, input_node)); in RecursivelyHandleOp()
|
D | map_vectorization_test.cc | 402 auto input_node = AddRangeNode(&graph); in TEST_P() local 420 auto map_and_batch_0 = make_map_and_batch(input_node, fuse_0); in TEST_P() 520 auto input_node = AddArbitraryInputNode(&graph, nullptr, &input_types); in TEST() local 523 AddMapNode(&graph, input_node->name(), map_fn->signature().name()); in TEST() 528 input_node->name()); in TEST() 539 auto input_node = AddArbitraryInputNode(&graph, &input_shapes, &input_types); in TEST() local 542 AddMapNode(&graph, input_node->name(), map_fn->signature().name()); in TEST() 547 input_node->name()); in TEST() 558 auto input_node = AddArbitraryInputNode(&graph, &input_shapes, &input_types); in TEST() local 561 AddMapNode(&graph, input_node->name(), map_fn->signature().name()); in TEST() [all …]
|
D | map_vectorization.cc | 195 Status AddNewBatchNode(const NodeDef& old_batch_node, const NodeDef& input_node, in AddNewBatchNode() argument 204 batch_node.add_input(input_node.name()); in AddNewBatchNode() 231 input_node.attr().at("output_shapes").list().shape(); in AddNewBatchNode() 478 const NodeDef*& input_node = *input_node_output; in FindMapAndBatchPattern() local 508 input_node = graph_utils::GetInputNode(*map_node, graph); in FindMapAndBatchPattern() 509 DCHECK_NE(input_node, nullptr); in FindMapAndBatchPattern() 511 if (!IsOutputShapesFullyDefined(*input_node)) { in FindMapAndBatchPattern() 547 const NodeDef* input_node; in OptimizeAndCollectStats() local 550 &optional_prefetch_node, &map_node, &input_node, in OptimizeAndCollectStats() 561 *batch_node, *input_node, *vectorized_func, &graph, &new_batch_node)); in OptimizeAndCollectStats() [all …]
|
D | noop_elimination_test.cc | 38 NodeDef *MakeUnaryNode(StringPiece node_type, int count, string input_node, in MakeUnaryNode() argument 42 {std::move(input_node), node_count->name()}, in MakeUnaryNode() 46 NodeDef *MakeUnaryNonConstNode(StringPiece node_type, string input_node, in MakeUnaryNonConstNode() argument 50 {std::move(input_node), node_count->name()}, in MakeUnaryNonConstNode() 54 NodeDef *MakeCacheNode(string input_node, MutableGraphView *graph) { in MakeCacheNode() argument 58 {std::move(input_node), node_filename->name()}, in MakeCacheNode()
|
D | vectorization_utils.cc | 437 Node* input_node; in StackTensor() local 438 TF_RETURN_IF_ERROR(map_defun_node_->input_node(0, &input_node)); in StackTensor() 442 node_builder("Shape").Input(input_node).Finalize(g, &shape_node)); in StackTensor() 504 Node* input_node; in AddArgTensorMappings() local 505 TF_RETURN_IF_ERROR(map_defun_node_->input_node( in AddArgTensorMappings() 506 arg_node->attrs().Find("index")->i(), &input_node)); in AddArgTensorMappings() 508 conversion_map_.insert({{arg_node, 0}, {input_node, 0, stacked}}); in AddArgTensorMappings() 512 {input_node, Graph::kControlSlot, stacked}}); in AddArgTensorMappings()
|
/external/tensorflow/tensorflow/core/graph/ |
D | benchmark_testlib.h | 128 const uint32 input_node = rnd.Uniform(i); in CreateRandomGraph() local 129 node.add_input(absl::StrCat(prefix, input_node)); in CreateRandomGraph() 155 NodeDef input_node = create_node(/*name=*/input_node_name); in CreateFaninFanoutNodeGraph() local 156 *graph.add_node() = std::move(input_node); in CreateFaninFanoutNodeGraph() 162 NodeDef input_node = create_node(/*name=*/input_node_name); in CreateFaninFanoutNodeGraph() local 163 *graph.add_node() = std::move(input_node); in CreateFaninFanoutNodeGraph()
|
/external/tensorflow/tensorflow/compiler/tf2xla/ |
D | tf2xla_util.cc | 228 const Node* input_node; in PropagateConstIntoIfNode() local 229 TF_RETURN_IF_ERROR(if_node->input_node(i, &input_node)); in PropagateConstIntoIfNode() 230 if (input_node->type_string() == "Const") { in PropagateConstIntoIfNode() 231 const_input_index_to_node[i - 1] = input_node; in PropagateConstIntoIfNode() 266 const Node* input_node; in PropagateConstIntoWhileNode() local 267 TF_RETURN_IF_ERROR(while_node->input_node(i, &input_node)); in PropagateConstIntoWhileNode() 268 if (input_node->type_string() != "Const") { in PropagateConstIntoWhileNode() 292 const_input_index_to_node[i] = input_node; in PropagateConstIntoWhileNode() 634 Node* input_node; in RewriteAssociatedFunction() local 635 TF_RETURN_IF_ERROR(node->input_node(i, &input_node)); in RewriteAssociatedFunction() [all …]
|
D | rearrange_function_argument.cc | 328 Node* input_node; in MaybeRewriteWhileNode() local 329 TF_RETURN_IF_ERROR(n->input_node(0, &input_node)); in MaybeRewriteWhileNode() 330 while (input_node->IsIdentity()) { in MaybeRewriteWhileNode() 331 TF_RETURN_IF_ERROR(input_node->input_node(0, &input_node)); in MaybeRewriteWhileNode() 333 if (input_node->IsArg()) { in MaybeRewriteWhileNode() 335 TF_RETURN_IF_ERROR(GetNodeAttr(input_node->def(), "index", &index)); in MaybeRewriteWhileNode() 343 input_node->DebugString(), in MaybeRewriteWhileNode()
|
/external/tensorflow/tensorflow/core/kernels/data/experimental/ |
D | stats_dataset_ops.cc | 95 Node* input_node; in AsGraphDefInternal() local 96 TF_RETURN_IF_ERROR(b->AddInputDataset(ctx, input_, &input_node)); in AsGraphDefInternal() 99 TF_RETURN_IF_ERROR(b->AddDataset(this, {input_node, tag_node}, output)); in AsGraphDefInternal() 212 Node* input_node; in AsGraphDefInternal() local 213 TF_RETURN_IF_ERROR(b->AddInputDataset(ctx, input_, &input_node)); in AsGraphDefInternal() 216 TF_RETURN_IF_ERROR(b->AddDataset(this, {input_node, tag_node}, output)); in AsGraphDefInternal()
|
/external/tensorflow/tensorflow/core/kernels/hexagon/ |
D | graph_transferer.cc | 129 for (const Node* const input_node : node->in_nodes()) { in LoadGraphFromProto() local 130 const string& name = input_node->name(); in LoadGraphFromProto() 313 for (const Node* const input_node : node.in_nodes()) { in AreAllInputsCached() local 314 if (node_name_to_id_cache_map_.count(input_node->name()) <= 0) { in AreAllInputsCached() 315 VLOG(1) << "input_node " << input_node->name() << " of " << node.name() in AreAllInputsCached() 351 Node* input_node; in TransformGraphToAddAggregatedInputNode() local 352 TF_RETURN_IF_ERROR(builder.Finalize(graph, &input_node)); in TransformGraphToAddAggregatedInputNode() 353 CHECK_NOTNULL(input_node); in TransformGraphToAddAggregatedInputNode() 357 shape_refiner->UpdateNode(input_node, false /* relax */, &refined)); in TransformGraphToAddAggregatedInputNode() 360 shape_refiner->GetContext(input_node); in TransformGraphToAddAggregatedInputNode() [all …]
|
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
D | dependency_optimizer.cc | 214 for (NodeDef* input_node : input_nodes) { in BypassingNodeIsBeneficial() 215 num_cross_in += static_cast<int>(input_node->device() != node_dev); in BypassingNodeIsBeneficial() 225 for (NodeDef* input_node : input_nodes) { in BypassingNodeIsBeneficial() 228 static_cast<int>(input_node->device() != output_node->device()); in BypassingNodeIsBeneficial() 379 NodeDef* input_node = node_map_->GetNode(node->input(i)); in OptimizeNode() local 380 if (input_node == nullptr) { in OptimizeNode() 384 input_nodes.push_back(input_node); in OptimizeNode() 547 const NodeDef* input_node = node_map_->GetNode(input); in TransitiveReduction() local 548 if (ModifiesFrameInfo(*input_node) || IsMerge(*input_node)) { in TransitiveReduction() 553 const int input_node_idx = node_to_idx_[input_node]; in TransitiveReduction()
|
D | memory_optimizer.cc | 114 const NodeDef* input_node = node_map.GetNode(input_name); in FindCandidateRecomputeNodes() local 115 if (is_target(*input_node)) { in FindCandidateRecomputeNodes() 147 const NodeDef* input_node = node_map.GetNode(input_name_raw); in connected_subgraph() local 148 if (expanded_nodes->count(input_node) == 0 && in connected_subgraph() 149 is_candidate(*input_node)) { in connected_subgraph() 150 to_visit.push(input_node); in connected_subgraph() 821 const NodeDef* input_node = it1->second; in FindSwapInTrigger() local 823 auto it2 = execution_times.find(input_node); in FindSwapInTrigger() 852 const NodeDef* input_node = it1->second; in FindSwapInTrigger() local 856 if (ModifiesFrameInfo(*input_node) || IsSwitch(*input_node) || in FindSwapInTrigger() [all …]
|
D | layout_optimizer.cc | 625 auto input_node = node_map_->GetNode(node_->input(input_index)); in UpdateAttrValueOfInput() local 631 *added_node = *input_node; in UpdateAttrValueOfInput() 658 auto input_node = node_map_->GetNode(node_->input(pos)); in AddLayoutTransposeToInputs() local 659 TF_RETURN_IF_ERROR(HasAttribute(*input_node, "_output_shapes")); in AddLayoutTransposeToInputs() 665 input_node->attr().at("_output_shapes").list().shape(output_pos), in AddLayoutTransposeToInputs() 952 auto input_node = node_map_->GetNode(input); in GetOrAddNodePermNHWCToNCHW() local 953 depended_node = NodeName(input_node->input(0)); in GetOrAddNodePermNHWCToNCHW() 1303 auto input_node = node_map_->GetNode(node.input(pos)); in IsNodeAfterNCHWToNHWC() local 1304 queue.push_back(input_node); in IsNodeAfterNCHWToNHWC() 1305 visited.insert(input_node->name()); in IsNodeAfterNCHWToNHWC() [all …]
|
/external/tensorflow/tensorflow/core/grappler/costs/ |
D | virtual_scheduler.cc | 495 const NodeDef* input_node = name_to_node[NodeName(input_node_name)]; in Init() local 497 CHECK(input_node); in Init() 498 const string in_device = DeviceName(input_node); in Init() 509 std::make_pair(input_node, input_node_port_num)); in Init() 510 auto& input_node_state = GetNodeStateOrCreateIt(input_node); in Init() 513 RecvNodeDescriptor recv_node(input_node, input_node_port_num, in Init() 528 CreateSendRecv(input_node, curr_node, input_node, input_node_name, in Init() 536 auto& input_node_state = GetNodeStateOrCreateIt(input_node); in Init() 656 const NodeDef* from, const NodeDef* to, const NodeDef* input_node, in CreateSendRecv() argument 696 if (input_node->attr().count(kAttrTensorName)) { in CreateSendRecv() [all …]
|
D | utils.cc | 102 const NodeDef* input_node = iter->second; in ExtractExtraProperties() local 108 << "\nInput node: " << input_node->DebugString(); in ExtractExtraProperties() 112 if (input_node->op() == "Const" && i < op_info->inputs_size()) { in ExtractExtraProperties() 113 auto it = input_node->attr().find("value"); in ExtractExtraProperties() 114 if (it == input_node->attr().end()) continue; in ExtractExtraProperties() 155 attr.set_s(input_node->op()); in ExtractExtraProperties()
|