Home
last modified time | relevance | path

Searched refs:const_node (Results 1 – 20 of 20) sorted by relevance

/external/tensorflow/tensorflow/tools/graph_transforms/
Dobfuscate_names_test.cc94 NodeDef* const_node = graph_def.add_node(); in TestManyNodes() local
95 const_node->set_name(strings::StrCat("const_node", i)); in TestManyNodes()
96 const_node->set_op("Const"); in TestManyNodes()
113 NodeDef* const_node = graph_def.add_node(); in TestNameClashes() local
114 const_node->set_name(strings::StrCat("1", i)); in TestNameClashes()
115 const_node->set_op("Const"); in TestNameClashes()
Dsort_by_execution_order_test.cc84 NodeDef* const_node = graph_def.add_node(); in TestSimpleLinear() local
85 const_node->set_name("const_node"); in TestSimpleLinear()
86 const_node->set_op("Const"); in TestSimpleLinear()
/external/tensorflow/tensorflow/lite/delegates/gpu/common/transformations/
Dmake_padding_test.cc45 auto const_node = graph.NewNode(); in TEST() local
46 const_node->operation.type = ToString(OperationType::CONST); in TEST()
51 const_node->operation.attributes = const_attr; in TEST()
55 ConnectTwoNodes(&graph, const_node, concat_node, &const_link).ok()); in TEST()
/external/tensorflow/tensorflow/lite/testing/op_tests/
Dplaceholder_with_default.py37 const_node = tf.constant([1, 2, 2, 0],
41 const_node, shape=[2, 2], name="input")
42 out = tf.equal(input_tensor, const_node, name="output")
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dloop_optimizer.cc119 NodeDef* const_node = nullptr; in HandleConst() local
124 const_node = node; in HandleConst()
133 const_node = node_map_->GetNode(const_node_name); in HandleConst()
134 if (const_node == nullptr) { in HandleConst()
135 const_node = optimized_graph_->add_node(); in HandleConst()
136 const_node->set_name(const_node_name); in HandleConst()
137 const_node->set_op("Const"); in HandleConst()
138 const_node->set_device(node->device()); in HandleConst()
139 *const_node->mutable_attr() = node->attr(); in HandleConst()
140 node_map_->AddNode(const_node->name(), const_node); in HandleConst()
[all …]
Dconstant_folding.cc1435 NodeDef* const_node = &const_nodes[i]; in FoldNode() local
1436 VLOG(3) << "Generated constant node: " << SummarizeNodeDef(*const_node); in FoldNode()
1437 if (const_node->name().empty()) { in FoldNode()
1447 auto it = absl::c_find(const_node->input(), input); in FoldNode()
1448 return it != const_node->input().end(); in FoldNode()
1456 *const_node->add_input() = input; in FoldNode()
1465 *const_node->add_input() = fanin_of_input; in FoldNode()
1480 *node->mutable_input() = const_node->input(); in FoldNode()
1484 *node->mutable_attr() = const_node->attr(); in FoldNode()
1487 if (node_map_->GetNode(const_node->name())) { in FoldNode()
[all …]
Dlayout_optimizer.cc905 auto const_node = AddNodePermConst(name, device, {0, 3, 1, 2}); in AddNodePermNHWCToNCHW() local
908 *const_node->add_input() = AsControlDependency(depended_node); in AddNodePermNHWCToNCHW()
909 return const_node; in AddNodePermNHWCToNCHW()
917 auto const_node = AddNodePermConst(name, device, {0, 2, 3, 1}); in AddNodePermNCHWToNHWC() local
920 *const_node->add_input() = AsControlDependency(depended_node); in AddNodePermNCHWToNHWC()
921 return const_node; in AddNodePermNCHWToNHWC()
954 auto const_node = in GetOrAddNodePermNHWCToNCHW() local
956 const_name = const_node->name(); in GetOrAddNodePermNHWCToNCHW()
972 auto const_node = in GetOrAddNodePermNCHWToNHWC() local
974 const_name = const_node->name(); in GetOrAddNodePermNCHWToNHWC()
Dloop_optimizer_test.cc189 const auto* const_node = view.GetNode("Const"); in TEST_F() local
190 ASSERT_NE(const_node, nullptr); in TEST_F()
191 const auto* const_node_node_def = const_node->node(); in TEST_F()
208 const auto* const_node = view.GetNode("Const"); in TEST_F() local
209 ASSERT_NE(const_node, nullptr); in TEST_F()
210 const auto* const_node_node_def = const_node->node(); in TEST_F()
Dauto_mixed_precision_test.cc651 auto const_node = node_map_original.GetNode("con1"); in TEST_F() local
652 const_node->add_input("^mrg1"); in TEST_F()
Dgeneric_layout_optimizer_transposer_test.cc626 auto* const_node = context.graph_view->GetNode( in TEST_F() local
628 ASSERT_NE(const_node, nullptr); in TEST_F()
633 VerifyRegularFaninMatch(transpose_node, 1, const_node->GetName(), 0); in TEST_F()
/external/tensorflow/tensorflow/cc/tools/
Dfreeze_saved_model.cc157 NodeDef* const_node) { in ConvertVariableToConstant() argument
158 const_node->set_name(variable_node.name()); in ConvertVariableToConstant()
159 const_node->set_op("Const"); in ConvertVariableToConstant()
160 (*const_node->mutable_attr())["dtype"] = variable_node.attr().at("dtype"); in ConvertVariableToConstant()
162 (*const_node->mutable_attr())["value"].mutable_tensor()); in ConvertVariableToConstant()
/external/tensorflow/tensorflow/core/kernels/
Dconstant_op_test.cc48 NodeDef const_node; in PersistentMemoryTrackingTest() local
52 .Finalize(&const_node)); in PersistentMemoryTrackingTest()
65 cpu_allocator(), const_node, in PersistentMemoryTrackingTest()
/external/tensorflow/tensorflow/core/grappler/optimizers/data/
Dfilter_with_random_uniform_fusion.cc86 const NodeDef* const_node = in FunctionFindFloatConst() local
88 if (const_node == nullptr) { in FunctionFindFloatConst()
91 if (const_node->attr().at("dtype").type() != DT_FLOAT) { in FunctionFindFloatConst()
94 const auto& value = const_node->attr().at("value").tensor().float_val(0); in FunctionFindFloatConst()
Dvectorization_utils_test.cc562 auto const_node = vectorized->node_def( in TEST() local
567 const_node.name()); in TEST()
649 auto const_node = find_const(2); in TEST() local
654 const_node->name()); in TEST()
/external/tensorflow/tensorflow/compiler/jit/
Dshape_inference.cc145 Node* const_node = graph->AddNode(const_def, &s); in PropagateShapes() local
148 graph->AddControlEdge(var_node, const_node); in PropagateShapes()
153 graph->AddControlEdge(const_node, e->dst()); in PropagateShapes()
159 graph->AddEdge(const_node, 0, dst, dst_input); in PropagateShapes()
Dmark_for_compilation_pass_test.cc1682 Output const_node = ops::Const(root.WithOpName("const"), 1.0f); in TEST() local
1683 root.graph()->AddControlEdge(identity.node(), const_node.node()); in TEST()
1684 Output tanh0 = ops::Tanh(root.WithOpName("tanh0"), const_node); in TEST()
1686 Output add = ops::Add(root.WithOpName("add"), const_node, tanh1); in TEST()
Dextract_outside_compilation_pass_test.cc757 Node *const_node = g->AddNode(const_def, &s); in TEST_F() local
766 g->AddEdge(const_node, 0, fn_node, 0); in TEST_F()
/external/tensorflow/tensorflow/compiler/tf2xla/
Dtf2xla_util.cc129 Node* const_node = g->AddNode(const_def, &s); in ReplaceArgUsageWithConstNode() local
150 *replace_def.mutable_input(usages[i].dst_input) = const_node->name(); in ReplaceArgUsageWithConstNode()
157 g->AddEdge(const_node, 0, replace_node, usages[i].dst_input); in ReplaceArgUsageWithConstNode()
901 Node* const_node = bwd_fbody->graph->AddNode(const_input_nodedef, &s); in RewriteTensorListWithConstElement() local
907 bwd_fbody->graph->AddEdge(const_node, 0, dst, dst_input); in RewriteTensorListWithConstElement()
/external/tensorflow/tensorflow/core/graph/
Dgraph_partition.cc703 Node* const_node = in AddControlFlow() local
706 AddControlFlowInfo(const_node, src_frame, &cf_info); in AddControlFlow()
707 g->AddEdge(const_node, 0, child_loop.enter, 0); in AddControlFlow()
/external/tensorflow/tensorflow/core/grappler/costs/
Dgraph_properties.cc395 NodeDef const_node; in MakeConstNodeDefFromTensorProto() local
396 const_node.set_name("const_from_shape"); in MakeConstNodeDefFromTensorProto()
397 const_node.set_op("Const"); in MakeConstNodeDefFromTensorProto()
398 auto* attr = const_node.mutable_attr(); in MakeConstNodeDefFromTensorProto()
402 return const_node; in MakeConstNodeDefFromTensorProto()