/third_party/mindspore/mindspore/core/ir/ |
D | manager.cc | 176 for (auto &fg : func_graphs) { in Manage() local 177 if (fg == nullptr) { in Manage() 180 if (fg->manager() != nullptr) { in Manage() 181 m = fg->manager(); in Manage() 192 for (auto &fg : func_graphs) { in Manage() local 193 if (fg == nullptr) { in Manage() 196 m->AddFuncGraph(fg, root); in Manage() 234 for (auto &fg : roots) { in Init() local 235 AddFuncGraph(fg, true); in Init() 239 FuncGraphSet &FuncGraphManager::func_graph_parents_total(const FuncGraphPtr &fg) const { in func_graph_parents_total() [all …]
|
D | manager.h | 101 void Recompute(const FuncGraphPtr &fg); 105 bool IsValidate(const FuncGraphPtr &fg) { return func_graphs_validate_[fg]; } in IsValidate() argument 137 void RealRecompute(FuncGraphPtr fg) override; 140 …FuncGraphSetPtr SeekParents(const FuncGraphPtr &fg, std::unordered_map<FuncGraphPtr, FuncGraphSetP… 160 void RealRecompute(FuncGraphPtr fg) override; 178 void RealRecompute(FuncGraphPtr fg) override; 196 void RealRecompute(FuncGraphPtr fg) override; 232 void RealRecompute(FuncGraphPtr fg) override; 246 void CheckRecursiveGraphs(const FuncGraphPtr &fg, std::list<FuncGraphPtr> *trace); 259 void RealRecompute(FuncGraphPtr fg) override; [all …]
|
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/irpass/ |
D | inline.h | 46 auto fg = GetValueNode<FuncGraphPtr>(node); in operator() local 47 if (fg->has_flag(FUNC_GRAPH_FLAG_DEFER_INLINE) || fg->stub() || *(fg->switch_input()) || in operator() 48 *(fg->switch_layer_input())) { in operator() 53 if (fg->stage() != -1 && stage_num > 1) { in operator() 57 if (fg->has_flag(FUNC_GRAPH_OUTPUT_NO_RECOMPUTE)) { in operator() 61 auto out = fg->output(); in operator() 68 auto params = fg->parameters(); in operator() 89 bool IsUniqueUse(InlinerBase *, const FuncGraphPtr &fg, const AnfNodePtr &); 91 bool IsTrivial(InlinerBase *, const FuncGraphPtr &fg, const AnfNodePtr &); 93 bool IsCore(InlinerBase *, const FuncGraphPtr &fg, const AnfNodePtr &); [all …]
|
D | parameter_eliminate.h | 44 const auto &[fg, callers] = SearchFuncGraphCallers(func_graph); in operator() 45 if (fg == nullptr) { in operator() 48 auto manager = fg->manager(); in operator() 50 const auto &erase_indexes = EraseUnusedParameters(fg, manager); in operator() 61 static std::vector<CNodePtr> GetCallers(const FuncGraphPtr &fg) { in GetCallers() argument 62 const auto &fg_caller_and_indexes = fg->func_graph_cnodes_index(); in GetCallers() 80 for (const auto &fg : func_graph->func_graphs_used_total()) { in SearchFuncGraphCallers() local 81 if (fg->has_flag(FUNC_GRAPH_FLAG_DEFER_INLINE)) { in SearchFuncGraphCallers() 84 const auto ¶meters = fg->parameters(); in SearchFuncGraphCallers() 85 MS_EXCEPTION_IF_NULL(fg->manager()); in SearchFuncGraphCallers() [all …]
|
D | call_graph_tuple_transform.h | 51 auto fg = GetValueNode<FuncGraphPtr>(inputs[0]); in operator() local 52 if (fg == nullptr) { in operator() 58 FuncGraphPtr transformed_fg = graph_transform_(fg, optimizer->manager()); in operator() 113 FuncGraphPtr fg = GetValueNode<FuncGraphPtr>(node); in TransformBranchNode() local 114 if (FuncGraphHasTupleInput(fg)) { in TransformBranchNode() 115 FuncGraphPtr transformed_fg = graph_transform_(fg, mng); in TransformBranchNode() 124 FuncGraphPtr fg = GetValueNode<FuncGraphPtr>(partial_inputs[1]); in TransformBranchNode() local 125 if (FuncGraphHasTupleInput(fg)) { in TransformBranchNode() 126 fg = graph_transform_(fg, mng); in TransformBranchNode() 129 *trans_node = TransformPartial(fg, node->cast<CNodePtr>()); in TransformBranchNode() [all …]
|
D | env_item_eliminate.h | 45 …FuncGraphPtr operator()(const FuncGraphPtr &fg, const SymbolicKeyInstancePtr &key, const AnfNodePt… in operator() 46 if (cache_.find(fg) == cache_.end()) { in operator() 47 cache_[fg] = {}; in operator() 50 auto &cache = cache_[fg]; in operator() 58 auto new_fg = TransformableClone(fg, std::make_shared<TraceTransform>(ss.str())); in operator() 78 cache_[fg] = cache; in operator() 100 …FuncGraphPtr operator()(const FuncGraphPtr &fg, const SymbolicKeyInstancePtr &key, const AnfNodePt… in operator() 101 if (cache_.find(fg) == cache_.end()) { in operator() 102 cache_[fg] = {}; in operator() 105 auto &cache = cache_[fg]; in operator() [all …]
|
D | updatestate_eliminate.cc | 46 auto fg = node->func_graph(); in GetManager() local 47 if (fg == nullptr) { in GetManager() 50 return fg->manager(); in GetManager() 116 auto fg = update_state->func_graph(); in NewUpdateStateWithAttach() local 117 if (fg == nullptr) { in NewUpdateStateWithAttach() 121 fg->NewCNode({update_state->input(kFirstInputIndex), update_state->input(kInputIndex), attach}); in NewUpdateStateWithAttach() 160 auto fg = depend->func_graph(); in EliminateUpdateStateWithDepend() local 161 MS_EXCEPTION_IF_NULL(fg); in EliminateUpdateStateWithDepend() 162 auto new_depend = fg->NewCNode(inputs); in EliminateUpdateStateWithDepend() 253 AnfNodePtr MakeTupleForSameNodes(const FuncGraphPtr &fg, const CNodePtr &old_update_state, in MakeTupleForSameNodes() argument [all …]
|
/third_party/ffmpeg/fftools/ |
D | ffmpeg_filter.c | 178 FilterGraph *fg = av_mallocz(sizeof(*fg)); in DEF_CHOOSE_FORMAT() local 180 if (!fg) in DEF_CHOOSE_FORMAT() 182 fg->index = nb_filtergraphs; in DEF_CHOOSE_FORMAT() 184 GROW_ARRAY(fg->outputs, fg->nb_outputs); in DEF_CHOOSE_FORMAT() 185 if (!(fg->outputs[0] = av_mallocz(sizeof(*fg->outputs[0])))) in DEF_CHOOSE_FORMAT() 187 fg->outputs[0]->ost = ost; in DEF_CHOOSE_FORMAT() 188 fg->outputs[0]->graph = fg; in DEF_CHOOSE_FORMAT() 189 fg->outputs[0]->format = -1; in DEF_CHOOSE_FORMAT() 191 ost->filter = fg->outputs[0]; in DEF_CHOOSE_FORMAT() 193 GROW_ARRAY(fg->inputs, fg->nb_inputs); in DEF_CHOOSE_FORMAT() [all …]
|
/third_party/mindspore/tests/ut/cpp/ir/ |
D | manager_test.cc | 278 FuncGraphPtr fg = std::make_shared<FuncGraph>(); in MakeNestedGraph() local 283 inputs.push_back(NewValueNode(fg)); in MakeNestedGraph() 292 CNodePtr cnode_g = fg->NewCNode(inputs); in MakeNestedGraph() 293 fg->set_return(cnode_g); in MakeNestedGraph() 295 std::vector<FuncGraphPtr> result = {f, fg}; in MakeNestedGraph() 436 FuncGraphPtr fg = std::make_shared<FuncGraph>(); in TEST_F() local 444 inputs.push_back(NewValueNode(fg)); in TEST_F() 455 ParameterPtr x1 = fg->add_parameter(); in TEST_F() 456 ParameterPtr y1 = fg->add_parameter(); in TEST_F() 460 CNodePtr cnode_3 = fg->NewCNode(inputs); in TEST_F() [all …]
|
D | anf_test.cc | 42 FuncGraphPtr fg = std::make_shared<FuncGraph>(); in TEST_F() local 43 ValueNode c1(fg); in TEST_F() 48 FuncGraphPtr fg = std::make_shared<FuncGraph>(); in TEST_F() local 49 Parameter a(fg); in TEST_F() 56 FuncGraphPtr fg = std::make_shared<FuncGraph>(); in TEST_F() local 57 std::string s = fg->ToString(); in TEST_F() 59 Parameter param(fg); in TEST_F() 61 CNode app_1(params, fg); in TEST_F() 64 CNode app(params, fg); in TEST_F() 70 FuncGraphPtr fg = std::make_shared<FuncGraph>(); in TEST_F() local [all …]
|
/third_party/mindspore/tests/ut/cpp/pre_activate/ascend/ir_fusion/ |
D | lamb_next_mv_rule_test.cc | 64 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 70 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 107 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 108 auto origin_graph = std::make_shared<session::KernelGraph>(*fg); in TEST_F() 114 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 150 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 151 auto origin_graph = std::make_shared<session::KernelGraph>(*fg); in TEST_F() 157 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 193 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 194 auto origin_graph = std::make_shared<session::KernelGraph>(*fg); in TEST_F() [all …]
|
D | lamb_next_mv_with_decay_rule_test.cc | 65 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 71 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 109 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 110 auto origin_graph = std::make_shared<session::KernelGraph>(*fg); in TEST_F() 116 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 154 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 155 auto origin_graph = std::make_shared<session::KernelGraph>(*fg); in TEST_F() 161 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 199 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 200 auto origin_graph = std::make_shared<session::KernelGraph>(*fg); in TEST_F() [all …]
|
D | adam_apply_one_fusion_test.cc | 57 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 63 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 95 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 101 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 133 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 139 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 171 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 177 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 209 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 215 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() [all …]
|
D | adam_apply_one_with_decay_rule_test.cc | 42 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 48 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 63 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 69 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 84 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 90 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 105 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 111 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 126 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 132 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() [all …]
|
D | lamb_next_mv_with_decay_v1_rule_test.cc | 39 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 45 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 59 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 60 auto origin_graph = std::make_shared<session::KernelGraph>(*fg); in TEST_F() 66 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 79 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 80 auto origin_graph = std::make_shared<session::KernelGraph>(*fg); in TEST_F() 86 FuncGraphPtr new_graph = optimizer->Optimize(fg); in TEST_F() 99 auto fg = GetKernelGraph(g, args_spec_list); in TEST_F() local 100 auto origin_graph = std::make_shared<session::KernelGraph>(*fg); in TEST_F() [all …]
|
/third_party/mindspore/mindspore/lite/tools/converter/import/ |
D | mindir_control_flow_adjust.cc | 42 std::vector<AnfNodePtr> MindIRControlFlowAdjust::GetFgOutput(const FuncGraphPtr &fg) { in GetFgOutput() argument 43 MS_CHECK_TRUE_MSG(fg != nullptr, {}, "fg is nullptr."); in GetFgOutput() 45 auto output_node = fg->output(); in GetFgOutput() 66 int MindIRControlFlowAdjust::ModifyFgToCallAfterFg(const FuncGraphPtr &fg, const FuncGraphPtr &afte… in ModifyFgToCallAfterFg() argument 67 MS_CHECK_TRUE_MSG(fg != nullptr, RET_NULL_PTR, "fg is nullptr."); in ModifyFgToCallAfterFg() 80 if (!opt::CheckPrimitiveType(fg->output(), prim::kPrimMakeTuple)) { in ModifyFgToCallAfterFg() 81 after_partial_cnode_inputs.push_back(fg->output()); in ModifyFgToCallAfterFg() 83 auto then_fg_output = fg->output()->cast<CNodePtr>(); in ModifyFgToCallAfterFg() 88 fg->DropNode(then_fg_output); in ModifyFgToCallAfterFg() 92 auto after_partial_cnode = fg->NewCNode(after_partial_cnode_inputs); in ModifyFgToCallAfterFg() [all …]
|
/third_party/grpc/tools/buildgen/plugins/ |
D | expand_filegroups.py | 58 filegroups_set = set(fg['name'] for fg in filegroups_list) 61 for fg in filegroups_list: 63 fg[lst] = fg.get(lst, []) 64 fg['own_%s' % lst] = list(fg[lst]) 66 if attr not in fg: 67 fg[attr] = val 128 for fg in filegroups.itervalues(): 130 fg[lst] = uniquify(fg.get(lst, [])) 145 fg = filegroups[fg_name] 146 for plugin in fg['plugins']: [all …]
|
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/ |
D | graph_transform.h | 31 bool FuncGraphHasTupleInput(const FuncGraphPtr &fg); 32 std::vector<AnfNodePtr> TransformTupleArgument(const FuncGraphPtr &fg, const AnfNodePtr &node, 42 FuncGraphPtr operator()(const FuncGraphPtr &fg, const FuncGraphManagerPtr &mng) { in operator() 43 if (cache_.find(fg) != cache_.end()) { in operator() 44 return cache_[fg]; in operator() 46 auto new_fg = TransformGraphParam(fg, mng); in operator() 47 cache_[fg] = new_fg; in operator() 51 …AnfNodePtr GenerateTupleParams(const abstract::AbstractTuplePtr &tuple_abs, const FuncGraphPtr &fg, in GenerateTupleParams() argument 58 inputs.push_back(GenerateTupleParams(item->cast<abstract::AbstractTuplePtr>(), fg, params)); in GenerateTupleParams() 60 auto p = std::make_shared<Parameter>(fg); in GenerateTupleParams() [all …]
|
D | graph_transform.cc | 50 bool FuncGraphHasTupleInput(const FuncGraphPtr &fg) { in FuncGraphHasTupleInput() argument 51 auto ¶ms = fg->parameters(); in FuncGraphHasTupleInput() 60 std::vector<AnfNodePtr> TransformTupleArgument(const FuncGraphPtr &fg, const AnfNodePtr &node, in TransformTupleArgument() argument 65 …auto elem_node = fg->NewCNode({NewValueNode(prim::kPrimTupleGetItem), node, NewValueNode(SizeToLon… in TransformTupleArgument() 68 …auto nodes = TransformTupleArgument(fg, elem_node, elements[i]->cast<abstract::AbstractTuplePtr>()… in TransformTupleArgument() 79 auto fg = cnode->func_graph(); in TransformCallGraph() local 88 auto nodes = TransformTupleArgument(fg, cinputs[i], abs->cast<abstract::AbstractTuplePtr>()); in TransformCallGraph() 94 auto new_node = fg->NewCNode(inputs); in TransformCallGraph() 101 auto fg = cnode->func_graph(); in TransformPartial() local 111 auto nodes = TransformTupleArgument(fg, cinputs[i], abs->cast<abstract::AbstractTuplePtr>()); in TransformPartial() [all …]
|
D | auto_monad_eliminate.cc | 30 std::vector<std::vector<size_t>> GenerateLoadGroups(const FuncGraphPtr &fg, const std::vector<AnfNo… in GenerateLoadGroups() argument 40 if (cnode == nullptr || cnode->func_graph() != fg) { in GenerateLoadGroups() 169 void ReplaceLoadUserMakeTuple(const FuncGraphManagerPtr &manager, const FuncGraphPtr &fg, const CNo… in ReplaceLoadUserMakeTuple() argument 175 const auto &new_make_tuple = fg->NewCNode(new_make_tuple_inputs); in ReplaceLoadUserMakeTuple() 185 bool ReplaceLoadUser(const FuncGraphManagerPtr &manager, const FuncGraphPtr &fg, const AnfNodePtr &… in ReplaceLoadUser() argument 212 ReplaceLoadUserMakeTuple(manager, fg, make_tuple, load); in ReplaceLoadUser() 220 bool ReplaceSameGroupLoad(const FuncGraphManagerPtr &manager, const FuncGraphPtr &fg, in ReplaceSameGroupLoad() argument 228 change = ReplaceLoadUser(manager, fg, toposet[group[i]]); in ReplaceSameGroupLoad() 234 AnfNodePtr GetFirstMonad(const FuncGraphPtr &fg) { in GetFirstMonad() argument 235 auto ¶ms = fg->parameters(); in GetFirstMonad() [all …]
|
/third_party/mindspore/mindspore/ccsrc/vm/ |
D | segment_runner.cc | 73 AnfNodePtr RefSubGraphNode(const FuncGraphPtr &fg, const AnfNodePtr &node, AnfNodePtrList *const in… in RefSubGraphNode() argument 75 MS_EXCEPTION_IF_NULL(fg); in RefSubGraphNode() 85 eqv[node] = fg->add_parameter(); in RefSubGraphNode() 97 FuncGraphPtr fg = nullptr; in TransformSegmentToAnfGraph() local 103 fg = std::make_shared<FuncGraph>(); in TransformSegmentToAnfGraph() 126 args.emplace_back(RefSubGraphNode(fg, inps[kRealInputIndexInDepend], &inputs, &eqv)); in TransformSegmentToAnfGraph() 133 … [&fg, &inputs, &eqv](const AnfNodePtr &a) { return RefSubGraphNode(fg, a, &inputs, &eqv); }); in TransformSegmentToAnfGraph() 136 MS_EXCEPTION_IF_NULL(fg); in TransformSegmentToAnfGraph() 137 eqv[n] = fg->NewCNode(args); in TransformSegmentToAnfGraph() 154 fg_output = fg->NewCNode(output_args); in TransformSegmentToAnfGraph() [all …]
|
/third_party/mindspore/mindspore/ccsrc/pipeline/jit/static_analysis/ |
D | evaluator.cc | 112 …r BaseFuncGraphEvaluator::LaunchStackFrame(const AnalysisEnginePtr &engine, const FuncGraphPtr &fg, in LaunchStackFrame() argument 117 …auto current_stack_frame = std::make_shared<StackFrame>(shared_from_base<Evaluator>(), fg, context… in LaunchStackFrame() 159 …aseFuncGraphEvaluator::LaunchRecursiveEval(const AnalysisEnginePtr &engine, const FuncGraphPtr &fg, in LaunchRecursiveEval() argument 161 MS_EXCEPTION_IF_NULL(fg); in LaunchRecursiveEval() 163 const AnfNodePtr &func_node = fg->get_return(); in LaunchRecursiveEval() 173 AnfNodeConfigPtr node_conf = engine->MakeConfig(node, context, fg); in LaunchRecursiveEval() 174 MS_LOG(DEBUG) << "Analysis node begin, func graph: " << fg << "/" << fg->ToString() in LaunchRecursiveEval() 214 FuncGraphPtr fg = GetFuncGraph(engine, args_abs_list); in Eval() local 215 MS_EXCEPTION_IF_NULL(fg); in Eval() 216 auto context = parent_context_->NewContext(fg, args_abs_list); in Eval() [all …]
|
/third_party/ffmpeg/libavfilter/ |
D | avf_abitscope.c | 42 uint8_t *fg; member 103 s->fg = av_malloc_array(s->nb_channels, 4 * sizeof(*s->fg)); in config_input() 104 if (!s->fg) in config_input() 112 uint8_t fg[4] = { 0xff, 0xff, 0xff, 0xff }; in config_input() local 117 av_parse_color(fg, color, -1, ctx); in config_input() 118 s->fg[4 * ch + 0] = fg[0]; in config_input() 119 s->fg[4 * ch + 1] = fg[1]; in config_input() 120 s->fg[4 * ch + 2] = fg[2]; in config_input() 121 s->fg[4 * ch + 3] = fg[3]; in config_input() 176 uint32_t color = AV_RN32(&s->fg[4 * ch]); in filter_frame() [all …]
|
/third_party/node/deps/npm/lib/utils/completion/ |
D | installed-shallow.js | 48 var fg 52 fg = global 73 fg = global || [] 78 if (!fg || !fl) return 80 fg = fg.map(function (g) { 84 console.error('filtered', fl, fg) 85 return cb(null, fl.concat(fg))
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/graph_kernel/ |
D | graph_kernel_helper.cc | 56 if (auto fg = AnfAlgo::GetCNodeFuncGraphPtr(out); fg != nullptr) { in IsMakeTupleOut() local 57 auto fg_out = fg->output(); in IsMakeTupleOut() 69 AnfNodePtrList EliminateMakeTuple(const FuncGraphPtr &fg, const FuncGraphManagerPtr &mng) { in EliminateMakeTuple() argument 71 auto out_node = fg->output(); in EliminateMakeTuple() 86 auto new_out = fg->NewCNode(output_args); in EliminateMakeTuple() 150 void ReplaceTensorWithScalar(const FuncGraphPtr &fg, const std::vector<AnfNodePtr> &scalar_tensors)… in ReplaceTensorWithScalar() argument 151 MS_EXCEPTION_IF_NULL(fg); in ReplaceTensorWithScalar() 156 auto sub_mng = fg->manager(); in ReplaceTensorWithScalar() 158 sub_mng = Manage(fg, true); in ReplaceTensorWithScalar() 159 fg->set_manager(sub_mng); in ReplaceTensorWithScalar() [all …]
|