Home
last modified time | relevance | path

Searched refs:input_node (Results 1 – 25 of 79) sorted by relevance

1234

/external/tensorflow/tensorflow/compiler/jit/
Drearrange_function_argument_pass_test.cc139 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 …]
Dshape_inference.cc121 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/
Dobfuscate_names.cc47 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()
Dremove_nodes.cc81 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()
Dfold_batch_norms.cc54 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()
Dflatten_atrous.cc57 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()
Dtransform_utils.cc351 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()
Drename_node.cc43 for (const NodeDef& input_node : input_graph_def.node()) { in RenameNode() local
45 *node = input_node; in RenameNode()
/external/tensorflow/tensorflow/compiler/tf2tensorrt/convert/
Dconvert_graph.cc123 bool ShallKeepControlEdgeFrom(const Node* input_node) { in ShallKeepControlEdgeFrom() argument
124 if (!input_node) { in ShallKeepControlEdgeFrom()
128 return input_node->type_string() != "Const"; in ShallKeepControlEdgeFrom()
172 auto input_node = edge->src(); in GetEngineInfo() local
173 if (input_node->IsSource() || segment_nodes.count(input_node)) { in GetEngineInfo()
177 if (ShallKeepControlEdgeFrom(input_node)) { in GetEngineInfo()
179 info->connections.emplace_back(input_node->name(), input_node->id(), in GetEngineInfo()
183 } else if (input_node->type_string() == "Const") { in GetEngineInfo()
192 if (!added_const_nodes.insert(input_node).second) { in GetEngineInfo()
196 VLOG(1) << "Adding const node " << input_node->name(); in GetEngineInfo()
[all …]
/external/tensorflow/tensorflow/core/grappler/optimizers/data/
Dauto_shard.cc439 const NodeDef* input_node = graph_utils::GetInputNode(*node, *graph, 0); in FindFuncAndTensorSliceDataset() local
440 if (input_node->op() == kTensorSliceDatasetOpName || in FindFuncAndTensorSliceDataset()
441 input_node->op() == kTensorDatasetOpName) { in FindFuncAndTensorSliceDataset()
443 graph_utils::GetInputNode(*input_node, *graph, 0); in FindFuncAndTensorSliceDataset()
456 const NodeDef* input_node = graph_utils::GetInputNode(*node, *graph, 0); in FindFuncAndTensorSliceDataset() local
457 return FindFuncAndTensorSliceDataset(input_node, num_workers, index, flib, in FindFuncAndTensorSliceDataset()
470 const NodeDef* input_node = graph_utils::GetInputNode(node, *graph, 0); in RecursivelyHandleOp() local
471 return RecursivelyHandleOp(*input_node, num_workers, index, flib, graph, in RecursivelyHandleOp()
482 const NodeDef* input_node = graph_utils::GetInputNode(node, *graph, i); in RecursivelyHandleOp() local
483 TF_RETURN_IF_ERROR(RecursivelyHandleOp(*input_node, num_workers, index, in RecursivelyHandleOp()
[all …]
Dslack.cc91 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()
Dnoop_elimination_test.cc39 string input_node, MutableGraphView *graph) { in MakeNode() argument
44 std::vector<string> inputs = {input_node}; in MakeNode()
53 std::vector<DataType> param_dtypes, string input_node, in MakeNonConstNode() argument
59 std::vector<string> inputs = {input_node}; in MakeNonConstNode()
68 NodeDef *MakeCacheNode(string input_node, MutableGraphView *graph) { in MakeCacheNode() argument
72 {std::move(input_node), node_filename->name()}, in MakeCacheNode()
/external/tensorflow/tensorflow/core/graph/
Dbenchmark_testlib.h128 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/
Drearrange_function_argument.cc328 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()
Dtf2xla_util.cc290 const Node* input_node; in PropagateConstIntoIfNode() local
291 TF_RETURN_IF_ERROR(if_node->input_node(i, &input_node)); in PropagateConstIntoIfNode()
292 if (input_node->type_string() == "Const") { in PropagateConstIntoIfNode()
293 const_input_index_to_node[i - 1] = input_node; in PropagateConstIntoIfNode()
812 Node* input_node; in RewriteAssociatedFunction() local
813 TF_RETURN_IF_ERROR(node->input_node(i, &input_node)); in RewriteAssociatedFunction()
814 builder.Input(input_node->name(), i, node->input_type(i)); in RewriteAssociatedFunction()
1056 Node* input_node; in RewriteTensorListWithConstElement() local
1057 TF_CHECK_OK(tl_push_nodes[0]->input_node(1, &input_node)); in RewriteTensorListWithConstElement()
1058 if (input_node->type_string() != "Const") { in RewriteTensorListWithConstElement()
[all …]
/external/tensorflow/tensorflow/core/kernels/data/experimental/
Dstats_dataset_ops.cc95 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()
Dtake_while_dataset_op.cc100 Node* input_node; in AsGraphDefInternal() local
101 TF_RETURN_IF_ERROR(b->AddInputDataset(ctx, input_, &input_node)); in AsGraphDefInternal()
114 this, {std::make_pair(0, input_node)}, in AsGraphDefInternal()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Ddependency_optimizer.cc220 for (NodeDef* input_node : input_nodes) { in BypassingNodeIsBeneficial()
221 num_cross_in += static_cast<int>(input_node->device() != node_dev); in BypassingNodeIsBeneficial()
231 for (NodeDef* input_node : input_nodes) { in BypassingNodeIsBeneficial()
234 static_cast<int>(input_node->device() != output_node->device()); in BypassingNodeIsBeneficial()
385 NodeDef* input_node = node_map_->GetNode(node->input(i)); in OptimizeNode() local
386 if (input_node == nullptr) { in OptimizeNode()
390 input_nodes.push_back(input_node); in OptimizeNode()
553 const NodeDef* input_node = node_map_->GetNode(input); in TransitiveReduction() local
554 if (ModifiesFrameInfo(*input_node) || IsMerge(*input_node)) { in TransitiveReduction()
559 const int input_node_idx = node_to_idx_[input_node]; in TransitiveReduction()
Dlayout_optimizer.cc626 auto input_node = node_map_->GetNode(node_->input(input_index)); in UpdateAttrValueOfInput() local
632 *added_node = *input_node; in UpdateAttrValueOfInput()
659 auto input_node = node_map_->GetNode(node_->input(pos)); in AddLayoutTransposeToInputs() local
660 TF_RETURN_IF_ERROR(HasAttribute(*input_node, "_output_shapes")); in AddLayoutTransposeToInputs()
666 input_node->attr().at("_output_shapes").list().shape(output_pos), in AddLayoutTransposeToInputs()
953 auto input_node = node_map_->GetNode(input); in GetOrAddNodePermNHWCToNCHW() local
954 depended_node = NodeName(input_node->input(0)); in GetOrAddNodePermNHWCToNCHW()
1304 auto input_node = node_map_->GetNode(node.input(pos)); in IsNodeAfterNCHWToNHWC() local
1305 queue.push_back(input_node); in IsNodeAfterNCHWToNHWC()
1306 visited.insert(input_node->name()); in IsNodeAfterNCHWToNHWC()
[all …]
Dmemory_optimizer.cc114 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 …]
Dconstant_folding.cc278 const NodeDef* input_node = node_map_->GetNode(NodeName(input)); in ForwardInputs() local
279 if (input_node == nullptr) { in ForwardInputs()
849 NodeDef* input_node = nullptr; in MaterializeConstantValuedNode() local
851 input_node = node_map_->GetNode(NodeName(node->input(i))); in MaterializeConstantValuedNode()
852 if (input_node == nullptr || !IsReallyConstant(*input_node)) { in MaterializeConstantValuedNode()
856 TF_RETURN_IF_ERROR(CheckAttrExists(*input_node, "value")); in MaterializeConstantValuedNode()
861 const TensorProto& input_tensor = input_node->attr().at("value").tensor(); in MaterializeConstantValuedNode()
870 input_node->name()); in MaterializeConstantValuedNode()
979 const NodeDef* input_node = node_map_->GetNode(input); in IsFoldableUncached() local
980 if (!input_node) { in IsFoldableUncached()
[all …]
/external/tensorflow/tensorflow/core/grappler/costs/
Dvirtual_scheduler.cc495 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 …]
Dutils.cc102 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()
/external/tensorflow/tensorflow/core/common_runtime/
Dmkl_tfconversion_pass.cc385 Node* input_node = nullptr; in RunPass() local
386 TF_CHECK_OK(n->input_node(0, &input_node)); in RunPass()
389 (input_node->type_string().compare("_MklInputConversion") == 0)) { in RunPass()
/external/tensorflow/tensorflow/core/kernels/data/
Dzip_dataset_op.cc124 Node* input_node; in AsGraphDefInternal() local
125 TF_RETURN_IF_ERROR(b->AddInputDataset(ctx, input, &input_node)); in AsGraphDefInternal()
126 input_graph_nodes.emplace_back(input_node); in AsGraphDefInternal()

1234