fix ci warning for not handling function retrun of RDR

This commit is contained in:
wangjunbao 2021-07-28 11:22:27 +08:00
parent 23ce12c727
commit f9d99e97d2
11 changed files with 18 additions and 18 deletions

View File

@ -416,7 +416,7 @@ void AscendBackendOptimization(const std::shared_ptr<session::KernelGraph> &kern
#ifdef ENABLE_DUMP_IR
const std::vector<CNodePtr> &exec_order = kernel_graph->execution_order();
std::string exec_order_name = "graph_exec_order." + std::to_string(kernel_graph->graph_id());
mindspore::RDR::RecordGraphExecOrder(SubModuleId::SM_OPTIMIZER, exec_order_name, exec_order);
(void)mindspore::RDR::RecordGraphExecOrder(SubModuleId::SM_OPTIMIZER, exec_order_name, exec_order);
#endif
if (save_graphs) {
std::string file_name = "hwopt_d_end_graph_" + std::to_string(kernel_graph->graph_id()) + ".ir";

View File

@ -358,9 +358,9 @@ bool Somas::InitSomasTensors(const session::KernelGraph *graph) {
#ifdef ENABLE_DUMP_IR
SubModuleId module = SubModuleId::SM_OPTIMIZER;
std::string name = "somas_pre_processed_info." + std::to_string(graph->graph_id());
mindspore::RDR::RecordString(module, name, SomasInfo());
(void)mindspore::RDR::RecordString(module, name, SomasInfo());
name = "somas_offline_log." + std::to_string(graph->graph_id());
mindspore::RDR::RecordString(module, name, Offline());
(void)mindspore::RDR::RecordString(module, name, Offline());
#endif
if (save_graphs_) {
@ -678,7 +678,7 @@ void Somas::InitBasicInfo(const session::KernelGraph *graph) {
#ifdef ENABLE_DUMP_IR
SubModuleId module = SubModuleId::SM_OPTIMIZER;
std::string name = "somas_initial_info." + std::to_string(graph->graph_id());
mindspore::RDR::RecordString(module, name, SomasInfo());
(void)mindspore::RDR::RecordString(module, name, SomasInfo());
#endif
save_graphs_ = context_ptr->get_param<bool>(MS_CTX_SAVE_GRAPHS_FLAG);

View File

@ -1191,7 +1191,7 @@ void AscendSession::DumpAllGraphs(const std::vector<KernelGraphPtr> &all_graphs)
MS_EXCEPTION_IF_NULL(graph);
std::string name = "graph_build." + std::to_string(graph->graph_id());
DumpGraphParams dump_params = {true, static_cast<int>(kWholeStack)};
mindspore::RDR::RecordAnfGraph(SUBMODULE_ID, name, graph, dump_params, ".ir;.pb");
(void)mindspore::RDR::RecordAnfGraph(SUBMODULE_ID, name, graph, dump_params, ".ir;.pb");
if (save_graphs) {
std::string file_name = "graph_build_" + std::to_string(graph->graph_id()) + ".ir";
DumpIR(file_name, graph, true, kWholeStack);

View File

@ -130,11 +130,11 @@ GraphId CPUSession::CompileGraphImpl(const AnfNodePtrList &lst, const AnfNodePtr
#ifdef ENABLE_DUMP_IR
std::string name = "graph_build." + std::to_string(graph->graph_id());
DumpGraphParams dump_params = {true, static_cast<int>(kWholeStack)};
mindspore::RDR::RecordAnfGraph(SubModuleId::SM_SESSION, name, graph, dump_params, ".ir");
(void)mindspore::RDR::RecordAnfGraph(SubModuleId::SM_SESSION, name, graph, dump_params, ".ir");
const std::vector<CNodePtr> &exec_order = graph->execution_order();
std::string exec_order_name = "graph_exec_order." + std::to_string(graph->graph_id());
mindspore::RDR::RecordGraphExecOrder(SubModuleId::SM_SESSION, exec_order_name, exec_order);
(void)mindspore::RDR::RecordGraphExecOrder(SubModuleId::SM_SESSION, exec_order_name, exec_order);
#endif
// runtime init

View File

@ -437,10 +437,10 @@ GraphId GPUSession::CompileGraphImpl(KernelGraphPtr graph) {
#ifdef ENABLE_DUMP_IR
std::string name = "graph_build";
DumpGraphParams dump_params = {true, static_cast<int>(kWholeStack)};
mindspore::RDR::RecordAnfGraph(SubModuleId::SM_SESSION, name, graph, dump_params, ".ir,.pb");
(void)mindspore::RDR::RecordAnfGraph(SubModuleId::SM_SESSION, name, graph, dump_params, ".ir,.pb");
auto &kernels = graph->execution_order();
std::string exec_order_name = "graph_exec_order." + std::to_string(graph->graph_id());
mindspore::RDR::RecordGraphExecOrder(SubModuleId::SM_SESSION, exec_order_name, kernels);
(void)mindspore::RDR::RecordGraphExecOrder(SubModuleId::SM_SESSION, exec_order_name, kernels);
#endif
// Get summary nodes.
SetSummaryNodes(graph.get());

View File

@ -836,7 +836,7 @@ void Pipeline::Run(const std::string &phase_s) {
if (i == actions_.size()) {
dump_params.dump_mode = static_cast<int>(kWholeStack);
}
mindspore::RDR::RecordAnfGraph(SUBMODULE_ID, name, graph_clone, dump_params, ".ir");
(void)mindspore::RDR::RecordAnfGraph(SUBMODULE_ID, name, graph_clone, dump_params, ".ir");
} else {
MS_LOG(WARNING) << "Clone FuncGraph failed in pipeline, no FuncGraph recording in RDR.";
}

View File

@ -234,7 +234,7 @@ void AscendStreamAssign::AssignStream(const NotNull<KernelGraphPtr> &graph_ptr)
SubModuleId module = SubModuleId::SM_SESSION;
std::string name = "assign_stream." + std::to_string(graph_ptr->graph_id());
const std::vector<CNodePtr> &exec_order = graph_ptr->execution_order();
mindspore::RDR::RecordStreamExecOrder(module, name, exec_order);
(void)mindspore::RDR::RecordStreamExecOrder(module, name, exec_order);
#endif
graph_ptr->PrintGraphExecuteOrder();

View File

@ -41,7 +41,7 @@ bool TaskGenerator::GenTasks(const std::vector<CNodePtr> &anf_node_list, std::ve
MS_LOG(INFO) << "GenTasks end...";
#ifdef ENABLE_DUMP_IR
string task_info_name = "task_info_graph." + std::to_string(graph_id);
mindspore::RDR::RecordTaskDebugInfo(SUBMODULE_ID, task_info_name, task_debug_info_list_);
(void)mindspore::RDR::RecordTaskDebugInfo(SUBMODULE_ID, task_info_name, task_debug_info_list_);
#endif
auto context_ptr = MsContext::GetInstance();
MS_EXCEPTION_IF_NULL(context_ptr);

View File

@ -719,7 +719,7 @@ bool GPUKernelRuntime::LaunchKernelDynamic(const session::KernelGraph *graph, bo
int exec_order = 1;
#ifdef ENABLE_DUMP_IR
std::string name = "mem_address_list";
mindspore::RDR::RecordGPUMemAddressInfo(SubModuleId::SM_KERNEL, name, kernels.size());
(void)mindspore::RDR::RecordGPUMemAddressInfo(SubModuleId::SM_KERNEL, name, kernels.size());
size_t id = 0;
#endif
CNodePtr last_kernel = GetLastKernel(graph);
@ -757,7 +757,7 @@ bool GPUKernelRuntime::LaunchKernelDynamic(const session::KernelGraph *graph, bo
#ifdef ENABLE_DUMP_IR
GPUMemInfo mem_info = {&kernel_inputs, &kernel_workspaces, &kernel_outputs};
std::string op_name = kernel->fullname_with_scope();
mindspore::RDR::UpdateGPUMemAddressInfo(SubModuleId::SM_KERNEL, name, op_name, mem_info, id++);
(void)mindspore::RDR::UpdateGPUMemAddressInfo(SubModuleId::SM_KERNEL, name, op_name, mem_info, id++);
#endif
if (!mock) {
LaunchKernelWithoutMock(graph, kernel, kernel_inputs, kernel_workspaces, kernel_outputs, profiling);

View File

@ -59,10 +59,10 @@ void MemoryManager::MallocSomasDynamicMem(const session::KernelGraph *graph) {
SubModuleId module = SubModuleId::SM_OPTIMIZER;
std::string name = "somas_allocate_info." + std::to_string(graph->graph_id());
mindspore::RDR::RecordString(module, name, somas_reuse_util_ptr_->SomasInfo());
(void)mindspore::RDR::RecordString(module, name, somas_reuse_util_ptr_->SomasInfo());
name = "somas_mem_info." + std::to_string(graph->graph_id());
mindspore::RDR::RecordString(module, name, somas_reuse_util_ptr_->SomasMemory());
(void)mindspore::RDR::RecordString(module, name, somas_reuse_util_ptr_->SomasMemory());
#endif
bool save_graphs = context_ptr->get_param<bool>(MS_CTX_SAVE_GRAPHS_FLAG);
auto save_graphs_path = context_ptr->get_param<std::string>(MS_CTX_SAVE_GRAPHS_PATH);

View File

@ -362,10 +362,10 @@ GraphId GraphCompiler::CompileGraphImpl(const KernelGraphPtr &graph, const Devic
#ifdef ENABLE_DUMP_IR
std::string name = "graph_build";
DumpGraphParams dump_params = {true, static_cast<int>(kWholeStack)};
mindspore::RDR::RecordAnfGraph(SubModuleId::SM_SESSION, name, graph, dump_params, ".ir,.pb");
(void)mindspore::RDR::RecordAnfGraph(SubModuleId::SM_SESSION, name, graph, dump_params, ".ir,.pb");
auto &kernels = graph->execution_order();
std::string exec_order_name = "graph_exec_order." + std::to_string(graph->graph_id());
mindspore::RDR::RecordGraphExecOrder(SubModuleId::SM_SESSION, exec_order_name, kernels);
(void)mindspore::RDR::RecordGraphExecOrder(SubModuleId::SM_SESSION, exec_order_name, kernels);
#endif
session_->DumpGraph(graph);