Home
last modified time | relevance | path

Searched refs:new_node (Results 1 – 25 of 165) sorted by relevance

1234567

/third_party/mindspore/mindspore/lite/tools/optimizer/common/
Dnode_pass_extends.cc49 AnfNodePtr new_node = Run(func_graph, node); in Run() local
50 bool change = (new_node != nullptr); in Run()
51 if (new_node != nullptr && new_node != node) { in Run()
52 (void)manager->Replace(node, new_node); in Run()
54 } else if (new_node == nullptr) { in Run()
55 new_node = node; in Run()
57 if (IsValueNode<FuncGraph>(new_node)) { in Run()
58 auto const_func_graph = GetValueNode<FuncGraphPtr>(new_node); in Run()
64 } else if (new_node->isa<CNode>()) { in Run()
65 if (IsGraphKernel(new_node)) { in Run()
[all …]
/third_party/python/Lib/lib2to3/
Dbtm_utils.py111 new_node = None
121 new_node = reduce_tree(node.children[0], parent)
124 new_node = MinNode(type=TYPE_ALTERNATIVES)
129 reduced = reduce_tree(child, new_node)
131 new_node.children.append(reduced)
135 new_node = MinNode(type=TYPE_GROUP)
137 reduced = reduce_tree(child, new_node)
139 new_node.children.append(reduced)
140 if not new_node.children:
142 new_node = None
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/common/
Dnode_pass.cc73 AnfNodePtr new_node = Run(fg, node); in Run() local
74 bool change = (new_node != nullptr); in Run()
75 if (new_node != nullptr && new_node != node) { in Run()
78 find_iter->second->set_abstract(new_node->abstract()); in Run()
80 (void)manager->Replace(node, new_node); in Run()
88 kernel_graph->set_end_goto(new_node->cast<CNodePtr>()); in Run()
92 } else if (new_node == nullptr) { in Run()
93 new_node = node; in Run()
95 if (new_node && IsValueNode<FuncGraph>(new_node)) { in Run()
96 auto const_func_graph = GetValueNode<FuncGraphPtr>(new_node); in Run()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/gpu/
Drelu_v2_pass.cc74 auto new_node = graph->NewCNode(inputs); in CreateReluV2() local
75 MS_EXCEPTION_IF_NULL(new_node); in CreateReluV2()
76 new_node->set_scope(relu->scope()); in CreateReluV2()
88 AnfAlgo::SetOutputInferTypeAndShape(types, shapes, new_node.get()); in CreateReluV2()
90 auto build_info = GenerateKernelBuildInfo(new_node); in CreateReluV2()
91 AnfAlgo::SetSelectKernelBuildInfo(build_info, new_node.get()); in CreateReluV2()
92 return new_node; in CreateReluV2()
102 auto new_node = graph->NewCNode(inputs); in CreateReluGradV2() local
103 MS_EXCEPTION_IF_NULL(new_node); in CreateReluGradV2()
104 new_node->set_scope(relu_grad->scope()); in CreateReluGradV2()
[all …]
/third_party/boost/boost/intrusive/
Dtreap_algorithms.hpp202 static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node);
205 static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node);
311 (node_ptr h, node_ptr new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp) in insert_equal_upper_bound() argument
314 bstree_algo::insert_equal_upper_bound_check(h, new_node, comp, commit_data); in insert_equal_upper_bound()
315 rebalance_check_and_commit(h, new_node, pcomp, commit_data); in insert_equal_upper_bound()
316 return new_node; in insert_equal_upper_bound()
336 (node_ptr h, node_ptr new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp) in insert_equal_lower_bound() argument
339 bstree_algo::insert_equal_lower_bound_check(h, new_node, comp, commit_data); in insert_equal_lower_bound()
340 rebalance_check_and_commit(h, new_node, pcomp, commit_data); in insert_equal_lower_bound()
341 return new_node; in insert_equal_lower_bound()
[all …]
Dsgtree_algorithms.hpp107 static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node);
110 static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node);
196 (node_ptr h, node_ptr new_node, NodePtrCompare comp in insert_equal_upper_bound() argument
200 bstree_algo::insert_equal_upper_bound(h, new_node, comp, &depth); in insert_equal_upper_bound()
201 rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size); in insert_equal_upper_bound()
202 return new_node; in insert_equal_upper_bound()
208 (node_ptr h, node_ptr new_node, NodePtrCompare comp in insert_equal_lower_bound() argument
212 bstree_algo::insert_equal_lower_bound(h, new_node, comp, &depth); in insert_equal_lower_bound()
213 rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size); in insert_equal_lower_bound()
214 return new_node; in insert_equal_lower_bound()
[all …]
Drbtree_algorithms.hpp230 static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) in replace_node() argument
232 if(node_to_be_replaced == new_node) in replace_node()
234 replace_node(node_to_be_replaced, bstree_algo::get_header(node_to_be_replaced), new_node); in replace_node()
238 static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) in replace_node() argument
240 bstree_algo::replace_node(node_to_be_replaced, header, new_node); in replace_node()
241 NodeTraits::set_color(new_node, NodeTraits::get_color(node_to_be_replaced)); in replace_node()
365 (node_ptr h, node_ptr new_node, NodePtrCompare comp) in insert_equal_upper_bound() argument
367 bstree_algo::insert_equal_upper_bound(h, new_node, comp); in insert_equal_upper_bound()
368 rebalance_after_insertion(h, new_node); in insert_equal_upper_bound()
369 return new_node; in insert_equal_upper_bound()
[all …]
Davltree_algorithms.hpp206 static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) in replace_node() argument
208 if(node_to_be_replaced == new_node) in replace_node()
210 replace_node(node_to_be_replaced, bstree_algo::get_header(node_to_be_replaced), new_node); in replace_node()
214 static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) in replace_node() argument
216 bstree_algo::replace_node(node_to_be_replaced, header, new_node); in replace_node()
217 NodeTraits::set_balance(new_node, NodeTraits::get_balance(node_to_be_replaced)); in replace_node()
350 (node_ptr h, node_ptr new_node, NodePtrCompare comp) in insert_equal_upper_bound() argument
352 bstree_algo::insert_equal_upper_bound(h, new_node, comp); in insert_equal_upper_bound()
353 rebalance_after_insertion(h, new_node); in insert_equal_upper_bound()
354 return new_node; in insert_equal_upper_bound()
[all …]
Dbstree_algorithms.hpp451 …OST_INTRUSIVE_FORCEINLINE static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) in replace_node() argument
453 if(node_to_be_replaced == new_node) in replace_node()
455 replace_node(node_to_be_replaced, base_type::get_header(node_to_be_replaced), new_node); in replace_node()
472 static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) in replace_node() argument
474 if(node_to_be_replaced == new_node) in replace_node()
479 NodeTraits::set_left(header, new_node); in replace_node()
483 NodeTraits::set_right(header, new_node); in replace_node()
487 NodeTraits::set_parent(header, new_node); in replace_node()
492 NodeTraits::set_left(new_node, NodeTraits::get_left(node_to_be_replaced)); in replace_node()
493 NodeTraits::set_right(new_node, NodeTraits::get_right(node_to_be_replaced)); in replace_node()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/enhancer/
Dadd_placeholder_for_dynamic_gru.cc60 auto new_node = kernel_graph->NewValueNode(value_node); in Process() local
61 kernel_graph->AddValueNodeToGraph(new_node); in Process()
62 new_inputs.push_back(new_node); in Process()
70 CNodePtr new_node = nullptr; in Process() local
72 new_node = std::make_shared<CNode>(*cnode); in Process()
74 new_node = kernel_graph->NewCNode(cnode); in Process()
76 MS_EXCEPTION_IF_NULL(new_node); in Process()
77 new_node->set_inputs(new_inputs); in Process()
78 return new_node; in Process()
Dadd_placeholder_for_dynamic_rnn.cc61 auto new_node = kernel_graph->NewValueNode(value_node); in Process() local
62 new_inputs.push_back(new_node); in Process()
67 CNodePtr new_node = nullptr; in Process() local
69 new_node = std::make_shared<CNode>(*cnode); in Process()
71 new_node = kernel_graph->NewCNode(cnode); in Process()
73 MS_EXCEPTION_IF_NULL(new_node); in Process()
74 new_node->set_inputs(new_inputs); in Process()
75 return new_node; in Process()
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/irpass/
Dreshape_eliminate.h96 auto new_node = fg->NewCNode({NewValueNode(prim_), x_, shape_}); in operator() local
97 new_node->set_abstract(node->abstract()); in operator()
99 new_node->set_scope(node->scope()); in operator()
101 return new_node; in operator()
137 auto new_node = reshape_same_shape_eliminater_(optimizer, node); in operator() local
138 if (new_node != nullptr) { in operator()
139 return new_node; in operator()
142 new_node = two_reshape_eliminater_(optimizer, node); in operator()
143 if (new_node != nullptr) { in operator()
144 return new_node; in operator()
Dcast_eliminate.h61 auto new_node = cast_same_type_eliminater_(optimizer, node); in operator() local
62 if (new_node != nullptr) { in operator()
63 return new_node; in operator()
66 new_node = two_cast_eliminater_(optimizer, node); in operator()
67 if (new_node != nullptr) { in operator()
68 return new_node; in operator()
/third_party/mindspore/mindspore/lite/src/
Dhuffman_decode.cc71 HuffmanNodePtr cur_node, tmp_node, new_node; in RebuildHuffmanTree() local
92 new_node = new (std::nothrow) HuffmanNode(); in RebuildHuffmanTree()
93 if (new_node == nullptr) { in RebuildHuffmanTree()
97 new_node->left = nullptr; in RebuildHuffmanTree()
98 new_node->right = nullptr; in RebuildHuffmanTree()
99 new_node->parent = cur_node; in RebuildHuffmanTree()
102 new_node->key = key; in RebuildHuffmanTree()
103 new_node->code = code; in RebuildHuffmanTree()
107 cur_node->left = new_node; in RebuildHuffmanTree()
109 cur_node->right = new_node; in RebuildHuffmanTree()
[all …]
/third_party/boost/boost/geometry/index/detail/rtree/visitors/
Dcopy.hpp46 subtree_destroyer new_node(raw_new_node, m_allocators); in operator ()() local
51 elements_type & elements_dst = rtree::elements(rtree::get<internal_node>(*new_node)); in operator ()()
66 result = new_node.get(); in operator ()()
67 new_node.release(); in operator ()()
73 subtree_destroyer new_node(raw_new_node, m_allocators); in operator ()() local
78 elements_type & elements_dst = rtree::elements(rtree::get<leaf>(*new_node)); in operator ()()
86 result = new_node.get(); in operator ()()
87 new_node.release(); in operator ()()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fusion/
Dreshape_transpose_fusion.cc77 auto new_node = func_graph->NewCNode(inputs); in Process() local
78 MS_EXCEPTION_IF_NULL(new_node); in Process()
79 new_node->set_abstract(node->abstract()); in Process()
81 AnfAlgo::CopyNodeAttrs(reshape_cnode, new_node); in Process()
82 AnfAlgo::CopyNodeAttr(kAttrPerm, transpose_cnode, new_node); in Process()
83 AnfAlgo::SetNodeAttr(kAttrTransposeFirst, MakeValue(false), new_node); in Process()
85 AnfAlgo::SetNodeAttr(kAttrShape, MakeValue(Convert2Long(reshape_output_shape)), new_node); in Process()
87 return new_node; in Process()
Dtranspose_reshape_fusion.cc76 auto new_node = func_graph->NewCNode(inputs); in Process() local
77 MS_EXCEPTION_IF_NULL(new_node); in Process()
79 new_node->set_abstract(node->abstract()); in Process()
80 AnfAlgo::CopyNodeAttrs(reshape_cnode, new_node); in Process()
81 AnfAlgo::CopyNodeAttr(kAttrPerm, transpose_cnode, new_node); in Process()
82 AnfAlgo::SetNodeAttr(kAttrTransposeFirst, MakeValue(true), new_node); in Process()
84 AnfAlgo::SetNodeAttr(kAttrShape, MakeValue(Convert2Long(reshape_output_shape)), new_node); in Process()
86 return new_node; in Process()
Dderelu_fusion.cc47 auto new_node = graph->NewCNode(inputs); in CreateReluV2() local
48 MS_EXCEPTION_IF_NULL(new_node); in CreateReluV2()
49 new_node->set_scope(relu->scope()); in CreateReluV2()
79 AnfAlgo::SetOutputInferTypeAndShape(types, shapes, new_node.get()); in CreateReluV2()
80 return new_node; in CreateReluV2()
90 auto new_node = graph->NewCNode(inputs); in CreateReluGradV2() local
91 MS_EXCEPTION_IF_NULL(new_node); in CreateReluGradV2()
92 new_node->set_scope(relu_grad->scope()); in CreateReluGradV2()
93 new_node->set_abstract(relu_grad->abstract()); in CreateReluGradV2()
94 return new_node; in CreateReluGradV2()
Dtranspose_transdata_fusion.cc60 auto new_node = func_graph->NewCNode(inputs); in Process() local
61 MS_EXCEPTION_IF_NULL(new_node); in Process()
62 new_node->set_abstract(node->abstract()); in Process()
63 AnfAlgo::CopyNodeAttrs(transdata_cnode, new_node); in Process()
64 AnfAlgo::SetNodeAttr(kAttrSrcFormat, MakeValue(transpose_input_formats[0]), new_node); in Process()
65 AnfAlgo::SetSelectKernelBuildInfo(new_transdata_builder->Build(), new_node.get()); in Process()
67 return new_node; in Process()
Dmatmul_biasadd_fusion.cc56 auto new_node = graph->NewCNode(inputs); in Process() local
57 MS_EXCEPTION_IF_NULL(new_node); in Process()
58 new_node->set_scope(node->scope()); in Process()
59 new_node->set_abstract(node->abstract()); in Process()
61 AnfAlgo::CopyNodeAttrs(matmul, new_node); in Process()
62 return new_node; in Process()
Dmomentum_lossscale_fusion.cc89 auto new_node = func_graph->NewCNode(new_node_inputs); in Process() local
90 MS_EXCEPTION_IF_NULL(new_node); in Process()
91 AnfAlgo::CopyNodeAttrs(node, new_node); in Process()
92 …auto input_names_value = AnfAlgo::GetNodeAttr<std::vector<std::string>>(new_node, kAttrInputNames); in Process()
95 AnfAlgo::SetNodeAttr(kAttrInputNames, MakeValue(input_names_value), new_node); in Process()
96 new_node->set_abstract(node->abstract()); in Process()
97 new_node->set_scope(node->scope()); in Process()
98 return new_node; in Process()
/third_party/python/Python/
Dhamt.c351 PyHamtNode **new_node);
827 PyHamtNode_Array *new_node = NULL; in hamt_node_bitmap_assoc() local
831 new_node = (PyHamtNode_Array *)hamt_node_array_new(n + 1); in hamt_node_bitmap_assoc()
832 if (new_node == NULL) { in hamt_node_bitmap_assoc()
845 new_node->a_array[jdx] = hamt_node_assoc( in hamt_node_bitmap_assoc()
847 if (new_node->a_array[jdx] == NULL) { in hamt_node_bitmap_assoc()
859 assert(new_node->a_array[i] == NULL); in hamt_node_bitmap_assoc()
862 new_node->a_array[i] = in hamt_node_bitmap_assoc()
864 Py_INCREF(new_node->a_array[i]); in hamt_node_bitmap_assoc()
872 new_node->a_array[i] = hamt_node_assoc( in hamt_node_bitmap_assoc()
[all …]
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/
Dclean.cc398 AnfNodePtr new_node = nullptr; in SimplifyDataStructures() local
400 new_node = NewValueNode(prim::kPrimMakeTuple); in SimplifyDataStructures()
402 new_node = ConvertGetAttrToTupleGetItem(cnode); in SimplifyDataStructures()
404 new_node = ConvertMakeRecordToMakeTuple(cnode); in SimplifyDataStructures()
406 new_node = ErasePartialNode(cnode); in SimplifyDataStructures()
408 new_node = ConvertDictGetItemToTupleGetItem(cnode); in SimplifyDataStructures()
410 new_node = ConvertDictSetItemToTupleSetItem(cnode); in SimplifyDataStructures()
412 new_node = EraseDictGetValues(cnode); in SimplifyDataStructures()
414 new_node = EraseMakeDictNode(cnode); in SimplifyDataStructures()
416 new_node = EraseMakeKeywordArgNode(cnode); in SimplifyDataStructures()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/format_type/
Dinsert_transpose_for_basiclstm_op.cc39 CNodePtr new_node = nullptr; in Insert() local
56 new_node = std::make_shared<CNode>(*cnode); in Insert()
58 new_node = kernel_graph->NewCNode(cnode); in Insert()
79 new_node = func_graph->NewCNode(make_tuple_inputs); in Insert()
81 return new_node; in Insert()
92 CNodePtr new_node = nullptr; in Process() local
94 new_node = Insert(func_graph, cnode, op_name); in Process()
96 return new_node; in Process()
/third_party/boost/boost/xpressive/detail/core/
Dlist.hpp117 node *new_node = new node(t); in push_front() local
119 new_node->_next = _sentry._next; in push_front()
120 new_node->_prev = &_sentry; in push_front()
122 _sentry._next->_prev = new_node; in push_front()
123 _sentry._next = new_node; in push_front()
128 node *new_node = new node(t); in push_back() local
130 new_node->_next = &_sentry; in push_back()
131 new_node->_prev = _sentry._prev; in push_back()
133 _sentry._prev->_next = new_node; in push_back()
134 _sentry._prev = new_node; in push_back()

1234567