/third_party/mindspore/mindspore/ccsrc/runtime/device/ |
D | kernel_adjust.h | 61 void InsertOverflowCheckOperations(const std::shared_ptr<session::KernelGraph> &kernel_graph_ptr); 62 void InsertSwitchLoop(const std::shared_ptr<session::KernelGraph> &kernel_graph_ptr); 63 bool StepLoadCtrlInputs(const std::shared_ptr<session::KernelGraph> &kernel_graph_ptr); 65 void Profiling(NotNull<session::KernelGraph *> kernel_graph_ptr); 68 CNodePtr CreateStreamActiveOp(const std::shared_ptr<session::KernelGraph> &kernel_graph_ptr); 74 CNodePtr CreateNPUGetFloatStatus(const std::shared_ptr<session::KernelGraph> &kernel_graph_ptr, 76 CNodePtr CreateNPUClearStatus(const std::shared_ptr<session::KernelGraph> &kernel_graph_ptr, 78 CNodePtr CreateNPUAllocStatus(const std::shared_ptr<session::KernelGraph> &kernel_graph_ptr); 79 …CNodePtr CreateAssignAdd(const std::shared_ptr<session::KernelGraph> &kernel_graph_ptr, const CNod… 81 …CNodePtr CreateAssign(const std::shared_ptr<session::KernelGraph> &kernel_graph_ptr, const AnfNode… [all …]
|
D | kernel_runtime.h | 56 virtual void AssignMemory(const session::KernelGraph &graph); 57 …ssignMemory(const std::vector<tensor::TensorPtr> &input_tensors, const session::KernelGraph &graph, 61 void RunOpClearMemory(const session::KernelGraph &graph) const; 62 …void RunOpMallocPre(const session::KernelGraph &graph, const std::vector<tensor::TensorPtr> &input… 67 virtual bool LoadData(const session::KernelGraph &graph); 68 virtual bool Load(const session::KernelGraph &graph, bool is_task_sink); 69 virtual bool Run(const session::KernelGraph &graph, bool is_task_sink) = 0; 70 virtual bool GenDynamicKernel(const session::KernelGraph &graph) = 0; 71 virtual bool RunDynamicKernelAsync(const session::KernelGraph &graph) = 0; 72 bool LaunchKernels(const session::KernelGraph &graph); [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/session/ |
D | gpu_session.h | 27 using KernelGraph = mindspore::session::KernelGraph; variable 43 …void PreExecuteGraph(const std::shared_ptr<KernelGraph> &kernel_graph, const std::vector<tensor::T… 45 …void PostExecuteGraph(const std::shared_ptr<KernelGraph> &kernel_graph, const std::vector<tensor::… 47 void ExecuteGraph(const std::shared_ptr<KernelGraph> &kernel_graph) override; 58 void LoadInputData(const std::shared_ptr<KernelGraph> &kernel_graph, 65 void SelectKernel(const std::shared_ptr<KernelGraph> &kernel_graph) const; 69 void Optimize(const std::shared_ptr<KernelGraph> &kernel_graph); 71 void HardwareOptimize(const std::shared_ptr<KernelGraph> &kernel_graph); 73 void RunOpOptimize(const std::shared_ptr<KernelGraph> &kernel_graph); 75 void RunOpHardwareOptimize(const std::shared_ptr<KernelGraph> &kernel_graph); [all …]
|
D | ascend_session.h | 55 void LoadInputData(const std::shared_ptr<KernelGraph> &kernel_graph, 57 …void PreExecuteGraph(const std::shared_ptr<KernelGraph> &kernel_graph, const std::vector<tensor::T… 59 …void PostExecuteGraph(const std::shared_ptr<KernelGraph> &kernel_graph, const std::vector<tensor::… 61 void ExecuteGraph(const std::shared_ptr<KernelGraph> &kernel_graph) override; 93 …void RecurseSetSummaryNodes(KernelGraph *graph, std::map<std::string, std::pair<AnfNodePtr, int>> … 94 void SetSummaryNodes(KernelGraph *graph) override; 97 void SelectKernel(const KernelGraph &kernel_graph) const; 98 void HardwareOptimize(const std::shared_ptr<KernelGraph> &kernel_graph) const; 99 void GraphKernelOptimize(const std::shared_ptr<KernelGraph> &kernel_graph) const; 100 void AdjustKernel(const std::shared_ptr<KernelGraph> &kernel_graph) const; [all …]
|
D | session_basic.h | 119 bool CreateCNodeOfKernelGraph(const AnfNodePtr &node, KernelGraph *graph); 121 …std::shared_ptr<KernelGraph> ConstructKernelGraph(const AnfNodePtrList &lst, const AnfNodePtrList … 123 std::shared_ptr<KernelGraph> ConstructKernelGraph(const FuncGraphPtr &func_graph, 126 CNodePtr CreateNewCNode(const CNodePtr &cnode, KernelGraph *graph, 128 CNodePtr CreateNewCNode(const CNodePtr &cnode, KernelGraph *graph); 135 bool IsGetNextGraph(const std::shared_ptr<KernelGraph> &kernel_graph, std::string *channel_name); 150 std::shared_ptr<KernelGraph> ConstructSingleOpGraph(const OpRunInfo &op_run_info, 172 …CNodePtr CreateSwitchInput(const CNodePtr &cnode, const AnfNodePtr &node_input, KernelGraph *graph… 173 std::vector<AnfNodePtr> CreateSwitchOrPartialNode(const CNodePtr &cnode, KernelGraph *graph); 174 std::vector<AnfNodePtr> CreateValueNode(const CNodePtr &cnode, KernelGraph *graph); [all …]
|
D | kernel_graph.cc | 141 AnfNodePtr KernelGraph::MakeValueNode(const AnfNodePtr &node) const { in MakeValueNode() 154 std::vector<AnfNodePtr> KernelGraph::outputs() const { in outputs() 165 void KernelGraph::EnqueueActiveNodes(const AnfNodePtr &node, std::queue<AnfNodePtr> *visit_queue, in EnqueueActiveNodes() 212 void KernelGraph::SetExecOrderByDefault() { in SetExecOrderByDefault() 277 std::vector<CNodePtr> KernelGraph::SortStartLabelAndEndGoto() { in SortStartLabelAndEndGoto() 326 void KernelGraph::GetLoopNodesByDFS(const AnfNodePtr &node, uint32_t *loop_num) { in GetLoopNodesByDFS() 372 uint32_t KernelGraph::GetLoopNum(const std::map<AnfNodePtr, size_t> &none_zero_nodes) { in GetLoopNum() 387 void KernelGraph::CheckLoop() { in CheckLoop() 416 CNodePtr KernelGraph::NewCNode(const std::vector<AnfNodePtr> &inputs) { in NewCNode() 431 CNodePtr KernelGraph::NewCNodeWithInfos(const std::vector<AnfNodePtr> &inputs, const CNodePtr &ori_… in NewCNodeWithInfos() [all …]
|
D | cpu_session.h | 39 …void PreExecuteGraph(const std::shared_ptr<KernelGraph> &kernel_graph, const std::vector<tensor::T… 41 …void PostExecuteGraph(const std::shared_ptr<KernelGraph> &kernel_graph, const std::vector<tensor::… 43 void ExecuteGraph(const std::shared_ptr<KernelGraph> &kernel_graph) override; 44 ParameterPtr CreateNewParameterFromParameter(const AnfNodePtr &anf, KernelGraph *graph) override; 45 void Optimize(const std::shared_ptr<KernelGraph> &kernel_graph); 54 void LoadInputData(const std::shared_ptr<KernelGraph> &kernel_graph, 59 void ProcessCast(const std::shared_ptr<KernelGraph> &kernel_graph); 60 void SetKernelInfo(const KernelGraph *kernel_graph); 61 void BuildKernel(const KernelGraph *kernel_graph);
|
D | kernel_graph.h | 54 class KernelGraph : public FuncGraph { 56 …KernelGraph() : graph_id_(0), start_label_(nullptr), end_goto_(nullptr), current_epoch_(0), is_dyn… in KernelGraph() function 65 KernelGraph(const KernelGraph &graph) : FuncGraph(graph) { in KernelGraph() function 114 ~KernelGraph() override; 116 MS_DECLARE_PARENT(KernelGraph, FuncGraph); 197 std::vector<std::shared_ptr<KernelGraph>> GetLeafGraphOrder(); 199 …const std::vector<std::weak_ptr<KernelGraph>> &child_graph_order() const { return child_graph_orde… in child_graph_order() 200 …void set_child_graph_order(const std::vector<std::weak_ptr<KernelGraph>> &order) { child_graph_ord… in set_child_graph_order() 211 std::weak_ptr<KernelGraph> parent_graph() const { return parent_graph_; } in parent_graph() 213 …void set_parent_graph(const std::weak_ptr<KernelGraph> &parent_graph) { parent_graph_ = parent_gra… in set_parent_graph() [all …]
|
/third_party/mindspore/mindspore/ccsrc/runtime/device/gpu/ |
D | gpu_kernel_runtime.h | 46 void AssignMemory(const session::KernelGraph &graph) override; 47 bool Run(const session::KernelGraph &graph, bool is_task_sink) override; 48 bool GenDynamicKernel(const session::KernelGraph &graph) override { return true; } in GenDynamicKernel() 49 bool RunDynamicKernelAsync(const session::KernelGraph &graph) override { return true; } in RunDynamicKernelAsync() 71 void InitKernelRefCount(const session::KernelGraph *graph); 72 void InitKernelOutputAddress(const session::KernelGraph *graph); 73 void InitKernelWorkspaceAddress(const session::KernelGraph *graph); 74 void InitMemorySwapInfo(const session::KernelGraph *graph); 75 void SaveGraphOutputNode(const session::KernelGraph *graph); 76 bool IsGraphOutput(const session::KernelGraph *graph, const mindspore::AnfNodePtr &kernel) const; [all …]
|
D | gpu_stream_assign.h | 51 void AssignGpuStream(const std::shared_ptr<session::KernelGraph> &kernel_graph); 52 bool FindAllReduceStreamSwitchPos(const std::shared_ptr<session::KernelGraph> &kernel_graph, 64 void InsertStreamSwitchNode(const std::shared_ptr<session::KernelGraph> &kernel_graph, 66 bool GenSendRecvCNodesForAllReduce(const std::shared_ptr<session::KernelGraph> &kernel_graph, 69 CNodePtr CreateStreamSwitchNode(const std::shared_ptr<session::KernelGraph> &kernel_graph, const st… 72 void CacheSendRecvCNodesForAllReduce(const std::shared_ptr<session::KernelGraph> &kernel_graph,
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/somas/ |
D | somas.h | 46 bool Allocate(const session::KernelGraph *graph); 111 bool InitSomasTensors(const session::KernelGraph *graph); 112 void InitBasicInfo(const session::KernelGraph *graph); 113 void InitSomasStreamAndNode(const session::KernelGraph *graph); 114 void InitSomasOutputAndWorkspaceTensors(const session::KernelGraph *graph); 115 void InitSomasInputTensors(const session::KernelGraph *graph); 116 void GetNextOutputProcess(const session::KernelGraph *graph); 117 void IndependentNodeOutputProcess(const session::KernelGraph *graph); 119 void SummaryInputProcess(const session::KernelGraph *graph); 121 void RefNodeProcess(const session::KernelGraph *graph); [all …]
|
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/profiling/ |
D | profiling_utils.h | 57 NotNull<session::KernelGraph *> graph_ptr, 59 …static void InsertProfilingTraceJobId(const AnfNodePtr &anf_node, NotNull<session::KernelGraph *> … 62 NotNull<session::KernelGraph *> graph_ptr, 66 NotNull<session::KernelGraph *> graph_ptr, 72 const session::KernelGraph &graph); 74 static ProfilingTraceInfo GenerateProfilingTrace(const session::KernelGraph &kernel_graph); 79 NotNull<session::KernelGraph *> graph_ptr, 91 NotNull<session::KernelGraph *> graph_ptr); 93 NotNull<session::KernelGraph *> graph_ptr); 94 static void GetTraceBegin(const session::KernelGraph &kernel_graph, const nlohmann::json &option, [all …]
|
D | profiling_utils.cc | 55 ProfilingTraceInfo ProfilingUtils::GenerateProfilingTrace(const session::KernelGraph &kernel_graph)… in GenerateProfilingTrace() 84 void ProfilingUtils::GetTraceHccl(const session::KernelGraph &kernel_graph, in GetTraceHccl() 95 void ProfilingUtils::GetTraceBegin(const session::KernelGraph &kernel_graph, const nlohmann::json &… in GetTraceBegin() 129 …ils::GetCNodeOutputRealNode(const std::string &node_name, const session::KernelGraph &kernel_graph, in GetCNodeOutputRealNode() 151 void ProfilingUtils::GetTraceBpEnd(const session::KernelGraph &kernel_graph, const nlohmann::json &… in GetTraceBpEnd() 203 std::string ProfilingUtils::GetGraphLastKernelName(const session::KernelGraph &kernel_graph) { in GetGraphLastKernelName() 221 void ProfilingUtils::GetTraceIterEnd(const session::KernelGraph &kernel_graph, ProfilingTraceInfo *… in GetTraceIterEnd() 248 NotNull<session::KernelGraph *> graph_ptr) { in CreateProfilingCNode() 285 NotNull<session::KernelGraph *> graph_ptr, in InsertProfilingTraceFp() 300 …s::InsertProfilingTraceJobId(const AnfNodePtr &anf_node, NotNull<session::KernelGraph *> graph_ptr, in InsertProfilingTraceJobId() [all …]
|
/third_party/mindspore/mindspore/ccsrc/runtime/device/cpu/ |
D | cpu_kernel_runtime.h | 39 bool Run(const session::KernelGraph &graph, bool is_task_sink) override; 40 void AssignKernelAddress(session::KernelGraph *kernel_graph); 41 …void CreateOutputTensors(session::KernelGraph *kernel_graph, const std::vector<tensor::TensorPtr> … 43 …void BindInputOutput(session::KernelGraph *kernel_graph, const std::vector<tensor::TensorPtr> &inp… 47 bool GenDynamicKernel(const session::KernelGraph &graph) override { return true; } in GenDynamicKernel() 48 bool RunDynamicKernelAsync(const session::KernelGraph &graph) override { return true; } in RunDynamicKernelAsync() 60 …tensor::TensorPtr CreatTensorForOutput(session::KernelGraph *kernel_graph, const CNodePtr &node, s… 62 …BaseRef CreatTensorForOutput(session::KernelGraph *kernel_graph, const session::KernelWithIndex &k… 64 …void BindInputTensorAddressPtr(const session::KernelGraph &graph, const std::vector<tensor::Tensor… 66 void AssignValueNodeAddress(session::KernelGraph *kernel_graph); [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ |
D | ascend_backend_optimization.h | 22 void RunOpAscendDataLayout(const std::shared_ptr<session::KernelGraph> &kernel_graph); 23 void RunOpAscendBackendIRFusionOptimization(const std::shared_ptr<session::KernelGraph> &kernel_gra… 24 void RunOpAscendBackendOptimization(const std::shared_ptr<session::KernelGraph> &kernel_graph); 25 void AscendDataLayout(const std::shared_ptr<session::KernelGraph> &kernel_graph); 26 void AscendMixPrecision(const std::shared_ptr<session::KernelGraph> &kernel_graph); 27 void AscendBackendOptimization(const std::shared_ptr<session::KernelGraph> &kernel_graph); 28 void AscendBackendIRFusionOptimization(const std::shared_ptr<session::KernelGraph> &kernel_graph); 29 void AscendBackendUBFusionOptimization(const std::shared_ptr<session::KernelGraph> &kernel_graph);
|
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/ |
D | ascend_kernel_runtime.h | 44 bool LoadData(const session::KernelGraph &graph) override; 45 bool GenTask(const session::KernelGraph &graph); 46 void GenKernelEvents(const session::KernelGraph &graph) override; 51 bool GenDynamicKernel(const session::KernelGraph &graph) override; 52 bool RunDynamicKernelAsync(const session::KernelGraph &graph) override; 53 bool LoadTask(const session::KernelGraph &graph); 54 bool RunTask(const session::KernelGraph &graph); 55 bool Load(const session::KernelGraph &graph, bool is_task_sink) override; 56 bool Run(const session::KernelGraph &graph, bool is_task_sink) override; 94 bool GraphWithEmptyTaskList(const session::KernelGraph &graph) const; [all …]
|
D | ascend_label_assign.cc | 67 static void AssignLabelForLabelSet(NotNull<std::shared_ptr<session::KernelGraph>> graph, NotNull<ui… in AssignLabelForLabelSet() 68 … NotNull<std::set<std::shared_ptr<session::KernelGraph>> *> memo) { in AssignLabelForLabelSet() 98 static void AssignLabelForGotoSwitch(NotNull<std::shared_ptr<session::KernelGraph>> graph, in AssignLabelForGotoSwitch() 99 … NotNull<std::set<std::shared_ptr<session::KernelGraph>> *> memo) { in AssignLabelForGotoSwitch() 130 void AscendLabelAssign::AssignLabel(NotNull<std::shared_ptr<session::KernelGraph>> graph) { in AssignLabel() 132 std::set<std::shared_ptr<session::KernelGraph>> memo; in AssignLabel() 144 uint32_t AscendLabelAssign::GetLabelNum(NotNull<const session::KernelGraph *> graph) { in GetLabelNum() 154 uint32_t AscendLabelAssign::GetLabelNum(NotNull<std::shared_ptr<session::KernelGraph>> graph) { in GetLabelNum()
|
D | ascend_label_assign.h | 38 void AssignLabel(NotNull<std::shared_ptr<session::KernelGraph>> graph); 39 uint32_t GetLabelNum(NotNull<const session::KernelGraph *> graph); 40 uint32_t GetLabelNum(NotNull<std::shared_ptr<session::KernelGraph>> graph); 46 std::map<const session::KernelGraph *, uint32_t> label_num_;
|
D | ascend_launch_atomic_clean.h | 39 void KernelSelect(const std::shared_ptr<session::KernelGraph> &kernel_graph) override; 40 void KernelBuild(const std::shared_ptr<session::KernelGraph> &kernel_graph) override; 48 std::shared_ptr<session::KernelGraph> atomic_clean_graph_; 52 std::shared_ptr<session::KernelGraph> ObtainAtomicCleanKernelGraph();
|
/third_party/mindspore/tests/ut/cpp/stub/tasksink/ |
D | ascend_stream_assign_stub.cc | 24 void AscendLabelAssign::AssignLabel(NotNull<std::shared_ptr<session::KernelGraph>> graph) {} in AssignLabel() 25 uint32_t AscendLabelAssign::GetLabelNum(NotNull<const session::KernelGraph *> graph) { return 1; } in GetLabelNum() 26 uint32_t AscendLabelAssign::GetLabelNum(NotNull<std::shared_ptr<session::KernelGraph>> graph) { ret… in GetLabelNum() 34 void KernelAdjust::InsertSwitchLoop(const std::shared_ptr<session::KernelGraph> &kernel_graph_ptr) … in InsertSwitchLoop() 35 bool KernelAdjust::StepLoadCtrlInputs(const std::shared_ptr<session::KernelGraph> &kernel_graph_ptr… in StepLoadCtrlInputs() 38 void KernelAdjust::Profiling(NotNull<session::KernelGraph *> kernel_graph_ptr) { return; } in Profiling() 40 void KernelAdjust::InsertOverflowCheckOperations(const std::shared_ptr<session::KernelGraph> &kerne… in InsertOverflowCheckOperations()
|
/third_party/mindspore/mindspore/ccsrc/debug/data_dump/ |
D | e2e_dump.h | 38 static void DumpSetup(const session::KernelGraph *graph); 42 …static void DumpData(const session::KernelGraph *graph, uint32_t rank_id, const Debugger *debugger… 44 …static bool DumpParametersAndConstData(const session::KernelGraph *graph, uint32_t rank_id, const … 49 static bool isDatasetGraph(const session::KernelGraph *graph); 61 …static void DumpOutput(const session::KernelGraph *graph, const std::string &dump_path, const Debu… 65 …static void DumpInput(const session::KernelGraph *graph, const std::string &dump_path, const Debug… 69 …static void DumpParametersAndConst(const session::KernelGraph *graph, const std::string &dump_path, 80 static void UpdateIterDumpSetup(const session::KernelGraph *graph, bool sink_mode);
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/mem_reuse/ |
D | mem_reuse_checker.h | 40 bool CheckGraphOutputAssigned(const session::KernelGraph *graph); 42 const KernelGraph *graph); 43 int64_t CalculOriStatic(const KernelGraph *graph) const; 44 int64_t CalculOriInput(const KernelGraph *graph) const; 45 int64_t CalculOriValue(const KernelGraph *graph) const; 46 int64_t CalculOriDy(const KernelGraph *graph) const; 47 int64_t CalculOriWk(const KernelGraph *graph) const; 55 void CheckNormalIR(const session::KernelGraph *graph);
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/buffer_fusion/ |
D | fusion_base_pass.h | 64 bool MatchUBFusionPattern(const session::KernelGraph &kernel_graph); 67 virtual void MatchSingleFusionPattern(const session::KernelGraph &kernel_graph, 70 bool CheckEltWiseNode(const session::KernelGraph &kernel_graph, const AnfNodePtr &node); 71 bool CheckDoubleInEltWiseNode(const session::KernelGraph &kernel_graph, const AnfNodePtr &node); 72 …bool CheckMultiOutputEltWiseNode(const session::KernelGraph &kernel_graph, const AnfNodePtr &node); 73 …size_t GetNotUpdateStateUserNums(const session::KernelGraph &kernel_graph, const AnfNodePtr &node);
|
D | fusion_base_pass.cc | 23 bool FusionBasePass::CheckEltWiseNode(const session::KernelGraph &kernel_graph, const AnfNodePtr &n… in CheckEltWiseNode() 38 bool FusionBasePass::CheckDoubleInEltWiseNode(const session::KernelGraph &kernel_graph, const AnfNo… in CheckDoubleInEltWiseNode() 53 bool FusionBasePass::CheckMultiOutputEltWiseNode(const session::KernelGraph &kernel_graph, const An… in CheckMultiOutputEltWiseNode() 68 size_t FusionBasePass::GetNotUpdateStateUserNums(const session::KernelGraph &kernel_graph, const An… in GetNotUpdateStateUserNums() 90 bool FusionBasePass::MatchUBFusionPattern(const session::KernelGraph &kernel_graph) { in MatchUBFusionPattern() 110 auto kernel_graph = graph->cast<std::shared_ptr<session::KernelGraph>>(); in Run()
|
/third_party/mindspore/tests/ut/cpp/session/ |
D | anf_runtime_algorithm_test.cc | 40 auto kernel_graph = std::make_shared<KernelGraph>(); in TEST_F() 99 auto kernel_graph = std::make_shared<KernelGraph>(); in TEST_F() 110 auto kernel_graph = std::make_shared<KernelGraph>(); in TEST_F() 122 auto kernel_graph = std::make_shared<KernelGraph>(); in TEST_F() 131 auto kernel_graph = std::make_shared<KernelGraph>(); in TEST_F() 145 auto kernel_graph = std::make_shared<KernelGraph>(); in TEST_F() 169 auto kernel_graph = std::make_shared<KernelGraph>(); in TEST_F() 193 auto kernel_graph = std::make_shared<KernelGraph>(); in TEST_F() 208 auto kernel_graph = std::make_shared<KernelGraph>(); in TEST_F() 221 auto kernel_graph = std::make_shared<KernelGraph>(); in TEST_F() [all …]
|