Browse Source

fix profiling log bug

tags/v0.7.0-beta
caifubi 5 years ago
parent
commit
6eba89b1bc
5 changed files with 15 additions and 12 deletions
  1. +9
    -7
      mindspore/ccsrc/debug/data_dump_parser.cc
  2. +3
    -3
      mindspore/ccsrc/runtime/device/ascend/profiling/profiling_utils.cc
  3. +1
    -0
      mindspore/ccsrc/runtime/device/ascend/profiling/reporter/graph_desc_reporter.cc
  4. +1
    -1
      mindspore/ccsrc/runtime/device/ascend/profiling/reporter/task_desc_reporter.cc
  5. +1
    -1
      mindspore/ccsrc/runtime/device/kernel_adjust.cc

+ 9
- 7
mindspore/ccsrc/debug/data_dump_parser.cc View File

@@ -137,18 +137,20 @@ bool DataDumpParser::NeedDump(const std::string &op_full_name) const {
return iter != kernel_map_.end();
}

bool DataDumpParser::IsConfigExist(const nlohmann::json &dump_settings) const {
if (dump_settings.find(kConfigDumpMode) == dump_settings.end() ||
dump_settings.find(kConfigNetName) == dump_settings.end() ||
dump_settings.find(kConfigOpDebugMode) == dump_settings.end() ||
dump_settings.find(kConfigIteration) == dump_settings.end() ||
dump_settings.find(kConfigKernels) == dump_settings.end()) {
MS_LOG(ERROR) << "[DataDump] DumpSettings keys are not exist.";
bool CheckConfigKey(const nlohmann::json &dump_settings, const std::string &key) {
if (dump_settings.find(key) == dump_settings.end()) {
MS_LOG(ERROR) << "[DataDump] DumpSettings key:" << key << " is not exist.";
return false;
}
return true;
}

bool DataDumpParser::IsConfigExist(const nlohmann::json &dump_settings) const {
return CheckConfigKey(dump_settings, kConfigDumpMode) && CheckConfigKey(dump_settings, kConfigNetName) &&
CheckConfigKey(dump_settings, kConfigOpDebugMode) && CheckConfigKey(dump_settings, kConfigIteration) &&
CheckConfigKey(dump_settings, kConfigKernels);
}

bool DataDumpParser::ParseDumpSetting(const nlohmann::json &dump_settings) {
auto mode = dump_settings.at(kConfigDumpMode);
auto op_debug_mode = dump_settings.at(kConfigOpDebugMode);


+ 3
- 3
mindspore/ccsrc/runtime/device/ascend/profiling/profiling_utils.cc View File

@@ -120,7 +120,7 @@ void ProfilingUtils::GetCNodeOutputRealNode(const std::string &node_name, const
}
}
if (getnext_outputs->empty()) {
MS_LOG(WARNING) << "GetNext not found";
MS_LOG(INFO) << "GetNext not found";
}
}

@@ -174,7 +174,7 @@ std::string ProfilingUtils::GetGraphLastTbeKernelName(const std::vector<CNodePtr
}
}
if (last_tbe_kernel_name.empty()) {
MS_LOG(WARNING) << "tbe kernel not found in graph";
MS_LOG(INFO) << "tbe kernel not found in graph";
}
return last_tbe_kernel_name;
}
@@ -330,7 +330,7 @@ bool ProfilingUtils::ValidComputeGraph(NotNull<const session::KernelGraph *> gra
void ProfilingUtils::ReportProfilingData(const std::vector<uint32_t> &task_ids, const std::vector<uint32_t> &stream_ids,
NotNull<const session::KernelGraph *> graph) {
if (!ValidComputeGraph(graph)) {
MS_LOG(WARNING) << "Not a valid compute graph:" << graph->graph_id();
MS_LOG(INFO) << "Not a valid compute graph:" << graph->graph_id();
return;
}



+ 1
- 0
mindspore/ccsrc/runtime/device/ascend/profiling/reporter/graph_desc_reporter.cc View File

@@ -25,6 +25,7 @@ namespace ascend {
void GraphDescReporter::ReportData() {
for (const auto &node : cnode_list_) {
if (AnfAlgo::GetKernelType(node) != TBE_KERNEL && AnfAlgo::GetKernelType(node) != AKG_KERNEL) {
MS_LOG(INFO) << "Skip non tbe kernel:" << node->fullname_with_scope();
continue;
}
std::vector<DataElement> input_data_list;


+ 1
- 1
mindspore/ccsrc/runtime/device/ascend/profiling/reporter/task_desc_reporter.cc View File

@@ -32,7 +32,7 @@ void TaskDescReporter::ReportData() {
size_t task_index = 0;
for (const auto &node : cnode_list_) {
if (AnfAlgo::GetKernelType(node) != TBE_KERNEL && AnfAlgo::GetKernelType(node) != AKG_KERNEL) {
MS_LOG(WARNING) << "Skip non tbe kernel";
MS_LOG(INFO) << "Skip non tbe kernel:" << node->fullname_with_scope();
++task_index;
continue;
}


+ 1
- 1
mindspore/ccsrc/runtime/device/kernel_adjust.cc View File

@@ -568,7 +568,7 @@ void KernelAdjust::Profiling(NotNull<session::KernelGraph *> kernel_graph_ptr) {
}
ProfilingTraceInfo profiling_trace_info = ProfilingUtils::GetProfilingTraceFromEnv(kernel_graph_ptr);
if (!profiling_trace_info.IsValid()) {
MS_LOG(WARNING) << "[profiling] no profiling node found!";
MS_LOG(INFO) << "[profiling] no profiling node found!";
return;
}
InsertProfilingKernel(profiling_trace_info, kernel_graph_ptr);


Loading…
Cancel
Save