/third_party/mindspore/tests/ut/cpp/transform/ |
D | convert_test.cc | 72 std::shared_ptr<FuncGraph> anf_graph = MakeFuncGraph(prim, nparam); in MakeDfGraph() local 73 std::shared_ptr<FuncGraphManager> graph_manager = MakeManager({anf_graph}); in MakeDfGraph() 75 DfGraphConvertor converter(anf_graph); in MakeDfGraph() 96 FuncGraphPtr anf_graph = MakeFuncGraph(conv2d, 2); in TEST_F() local 97 std::shared_ptr<FuncGraphManager> graph_manager = MakeManager({anf_graph}); in TEST_F() 98 DfGraphConvertor converter(anf_graph); in TEST_F() 106 FuncGraphPtr anf_graph = MakeFuncGraph(prim, 5); // ary, ksize, stride, padding, data_format in TEST_F() local 108 std::shared_ptr<FuncGraphManager> graph_manager = MakeManager({anf_graph}); in TEST_F() 109 DfGraphConvertor converter(anf_graph); in TEST_F() 141 FuncGraphPtr anf_graph = std::make_shared<FuncGraph>(); in TEST_F() local [all …]
|
D | graph_runner_test.cc | 70 FuncGraphPtr anf_graph = MakeFuncGraph(conv2d, 2); in MakeGeGraph() local 71 std::shared_ptr<FuncGraphManager> ir_graph_manager = MakeManager({anf_graph}); in MakeGeGraph() 73 return std::make_shared<DfGraphConvertor>(anf_graph); in MakeGeGraph()
|
/third_party/mindspore/tests/ut/cpp/session/ |
D | session_basic_test.cc | 42 auto anf_graph = std::make_shared<FuncGraph>(); in TEST_F() local 47 auto original_x_parameter = anf_graph->add_parameter(); in TEST_F() 51 auto original_y_parameter = anf_graph->add_parameter(); in TEST_F() 56 auto original_add = anf_graph->NewCNode(add_inputs); in TEST_F() 60 auto original_z_parameter = anf_graph->add_parameter(); in TEST_F() 65 auto original_mul = anf_graph->NewCNode(mul_inputs); in TEST_F()
|
D | kernel_graph_test.cc | 60 auto anf_graph = std::make_shared<FuncGraph>(); in TEST_F() local 71 auto non_weight_parameter = anf_graph->add_parameter(); in TEST_F() 83 auto weight_parameter_node = anf_graph->add_parameter(); in TEST_F()
|
/third_party/mindspore/mindspore/ccsrc/cxx_api/model/acl/ |
D | model_converter.cc | 28 transform::TensorOrderMap GetParams(const FuncGraphPtr &anf_graph) { in GetParams() argument 30 for (auto &anf_node : anf_graph->parameters()) { in GetParams() 74 transform::DfGraphPtr ModelConverter::ConvertFuncGraphToAIR(const FuncGraphPtr &anf_graph) { in ConvertFuncGraphToAIR() argument 75 MS_EXCEPTION_IF_NULL(anf_graph); in ConvertFuncGraphToAIR() 76 transform::DfGraphConvertor converter(anf_graph); in ConvertFuncGraphToAIR() 82 (void)converter.ConvertAllNode().InitParam(GetParams(anf_graph)).BuildGraph(); in ConvertFuncGraphToAIR() 89 …(void)transform::DfGraphManager::GetInstance().AddGraph(anf_graph->ToString(), converter.GetComput… in ConvertFuncGraphToAIR() 96 transform::DfGraphManager::GetInstance().SetAnfGraph(checkpoint_name, anf_graph); in ConvertFuncGraphToAIR() 106 auto wrap_ptr = transform::DfGraphManager::GetInstance().GetGraphByName(anf_graph->ToString()); in ConvertFuncGraphToAIR()
|
D | model_converter.h | 41 transform::DfGraphPtr ConvertFuncGraphToAIR(const FuncGraphPtr &anf_graph);
|
/third_party/mindspore/mindspore/lite/tools/converter/parser/onnx/ |
D | onnx_model_parser.cc | 68 ParameterPtr CreateConstParamter(const FuncGraphPtr &anf_graph, int val) { in CreateConstParamter() argument 69 MS_ASSERT(anf_graph != nullptr); in CreateConstParamter() 70 auto const_node = anf_graph->add_parameter(); in CreateConstParamter() 112 STATUS AddIterNumsUpdateEdge(const FuncGraphPtr &anf_graph, std::vector<AnfNodePtr> *return_new_inp… in AddIterNumsUpdateEdge() argument 115 MS_ASSERT(anf_graph != nullptr && return_new_inputs != nullptr); in AddIterNumsUpdateEdge() 132 auto const_one_parameter = CreateConstParamter(anf_graph, 1); in AddIterNumsUpdateEdge() 137 auto sub_cnode = anf_graph->NewCNode(sub_inputs); in AddIterNumsUpdateEdge() 162 STATUS BuildReturnNode(const FuncGraphPtr &anf_graph, const std::vector<AnfNodePtr> &return_inputs)… in BuildReturnNode() argument 163 MS_ASSERT(anf_graph != nullptr); in BuildReturnNode() 169 auto return_cnode = anf_graph->NewCNode(return_prim, return_inputs); in BuildReturnNode() [all …]
|
D | onnx_model_parser.h | 68 …STATUS AddTensorArrayEdge(const FuncGraphPtr &anf_graph, std::vector<AnfNodePtr> *return_new_input… 75 STATUS ConvertIfSubgraph(const onnx::GraphProto &onnx_graph, const FuncGraphPtr &anf_graph,
|
/third_party/mindspore/mindspore/ccsrc/cxx_api/ |
D | serialization.cc | 113 FuncGraphPtr anf_graph = nullptr; in Load() local 125 … anf_graph = ConvertStreamToFuncGraph(reinterpret_cast<const char *>(model_data), data_size); in Load() 136 …anf_graph = ConvertStreamToFuncGraph(reinterpret_cast<const char *>(plain_data.get()), plain_data_… in Load() 144 *graph = Graph(std::make_shared<Graph::GraphData>(anf_graph, kMindIR)); in Load() 176 FuncGraphPtr anf_graph; in Load() local 186 anf_graph = in Load() 189 if (anf_graph == nullptr) { in Load() 194 auto graph_data = std::make_shared<Graph::GraphData>(anf_graph, kMindIR); in Load()
|
/third_party/mindspore/mindspore/ccsrc/transform/graph_ir/ |
D | convert.h | 55 explicit DfGraphConvertor(const AnfGraphPtr &anf_graph) : anf_graph_(anf_graph) { in DfGraphConvertor() argument 56 MS_EXCEPTION_IF_NULL(anf_graph); in DfGraphConvertor() 59 training_ = anf_graph->has_flag("training"); in DfGraphConvertor() 63 distribute_ = anf_graph->has_flag("broadcast_flag"); in DfGraphConvertor() 64 if (anf_graph->has_flag("broadcast_flag")) { in DfGraphConvertor()
|
D | convert.cc | 1376 FuncGraphPtr anf_graph = graph_node->value()->cast<FuncGraphPtr>(); in ProcessSubgraph() local 1377 DfGraphConvertor converter(anf_graph); in ProcessSubgraph()
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/pass/ |
D | convert_tuple_output_to_maketuple.cc | 37 FuncGraphPtr anf_graph = tuple_anf->func_graph(); in ConvertTupleInputToMakeTuple() local 38 if (anf_graph != nullptr) { in ConvertTupleInputToMakeTuple() 39 kernel_graph = anf_graph->cast<KernelGraphPtr>(); in ConvertTupleInputToMakeTuple()
|
/third_party/mindspore/tests/ut/cpp/pre_activate/mem_reuse/ |
D | mem_reuse_test.cc | 153 auto anf_graph = std::make_shared<FuncGraph>(); in CreateGraphWithExecOrder() local 157 auto original_x_parameter = anf_graph->add_parameter(); in CreateGraphWithExecOrder() 161 auto original_y_parameter = anf_graph->add_parameter(); in CreateGraphWithExecOrder() 166 auto original_add = anf_graph->NewCNode(add_inputs); in CreateGraphWithExecOrder() 170 auto original_z_parameter = anf_graph->add_parameter(); in CreateGraphWithExecOrder() 175 auto original_mul = anf_graph->NewCNode(mul_inputs); in CreateGraphWithExecOrder()
|
/third_party/mindspore/mindspore/ccsrc/pipeline/jit/ |
D | pipeline_ge.cc | 179 FuncGraphPtr anf_graph = info.at(phase)->func_graph; in AddDFGraph() local 180 DfGraphConvertor converter(anf_graph); in AddDFGraph() 235 DfGraphManager::GetInstance().SetAnfGraph(checkpoint_name, anf_graph); in AddDFGraph() 246 FuncGraphPtr anf_graph = info.at(phase)->func_graph; in BuildDFGraph() local 249 draw::Draw("anf_graph.dot", anf_graph); // for debug in BuildDFGraph() 250 DumpIR("anf_graph.ir", anf_graph, true); in BuildDFGraph() 270 return anf_graph; in BuildDFGraph() 489 FuncGraphPtr anf_graph = info.at(phase)->func_graph; in ExecDFGraph() local 511 std::shared_ptr<py::object> ret = DoExecGraph(anf_graph, inputs, phase); in ExecDFGraph()
|
/third_party/mindspore/mindspore/ccsrc/utils/ |
D | callbacks_ge.cc | 72 FuncGraphPtr anf_graph = transform::DfGraphManager::GetInstance().GetAnfGraph(graph_id); in GetMeTensorTransformed() local 73 if (anf_graph == nullptr) { in GetMeTensorTransformed() 79 if (!GetParameterShape(anf_graph, parameter_name, parameter_shape_ptr)) { in GetMeTensorTransformed()
|
D | callbacks.h | 42 bool GetParameterShape(const FuncGraphPtr &anf_graph, const std::string ¶m_name,
|
/third_party/mindspore/mindspore/lite/tools/converter/parser/tf/ |
D | tf_model_parser.h | 56 const FuncGraphPtr &anf_graph, 65 const FuncGraphPtr &anf_graph, int output_size); 97 …US MakeAnfGraphOutputs(const std::vector<AnfNodePtr> &output_nodes, const FuncGraphPtr &anf_graph);
|
D | tf_model_parser.cc | 475 const FuncGraphPtr &anf_graph, in ConvertGraphInputsAndConsts() argument 488 CHECK_NULL_RETURN(anf_graph); in ConvertGraphInputsAndConsts() 489 auto parameter = anf_graph->add_parameter(); in ConvertGraphInputsAndConsts() 856 const FuncGraphPtr &anf_graph, int output_size) { in ConvertOutputTensor() argument 858 MS_ASSERT(anf_graph != nullptr); in ConvertOutputTensor() 896 CNodePtr get_item_cnode = anf_graph->NewCNode(inputs); in ConvertOutputTensor() 1140 …::MakeAnfGraphOutputs(const std::vector<AnfNodePtr> &output_nodes, const FuncGraphPtr &anf_graph) { in MakeAnfGraphOutputs() argument 1141 if (output_nodes.empty() || anf_graph == nullptr) { in MakeAnfGraphOutputs() 1155 auto make_tuple_cnode = anf_graph->NewCNode(make_tuple_inputs); in MakeAnfGraphOutputs() 1167 auto cnode = anf_graph->NewCNode(op_inputs); in MakeAnfGraphOutputs() [all …]
|