Change profiling reporter tag

pull/11030/head
caifubi 4 years ago committed by yanghaitao1
parent 2145757ced
commit ab07dbdff2

@ -374,12 +374,12 @@ void ProfilingUtils::ReportProfilingData(const std::vector<uint32_t> &task_ids,
auto context = MsContext::GetInstance();
MS_EXCEPTION_IF_NULL(context);
TaskDescReporter task_reporter(context->get_param<uint32_t>(MS_CTX_DEVICE_ID), "vm.task_desc_info", ret->second);
TaskDescReporter task_reporter(context->get_param<uint32_t>(MS_CTX_DEVICE_ID), "vm_task_desc_info", ret->second);
task_reporter.set_task_ids(task_ids);
task_reporter.set_stream_ids(stream_ids);
task_reporter.ReportData();
GraphDescReporter graph_reporter(context->get_param<uint32_t>(MS_CTX_DEVICE_ID), "vm.graph_desc_info", ret->second);
GraphDescReporter graph_reporter(context->get_param<uint32_t>(MS_CTX_DEVICE_ID), "vm_graph_desc_info", ret->second);
graph_profiling_cnode_.erase(ret);
graph_reporter.ReportData();
@ -389,7 +389,7 @@ void ProfilingUtils::ReportProfilingData(const std::vector<uint32_t> &task_ids,
MS_LOG(ERROR) << "Graph id not found in graph_point";
return;
}
PointReporter point_reporter(context->get_param<uint32_t>(MS_CTX_DEVICE_ID), "vm.point");
PointReporter point_reporter(context->get_param<uint32_t>(MS_CTX_DEVICE_ID), "vm_point");
for (const auto &point : point_iter->second) {
point_reporter.AddReportData(point);
}

@ -340,11 +340,11 @@ class FrameworkParser:
data_type = attrs.get('data_type')
data_type = data_type.replace("host.", "")
if data_type.startswith('vm.'):
if data_type.startswith('vm_'):
if self._backend_type and self._backend_type != 'vm':
raise ProfilerRawFileException('Backend type is inconsistent.')
self._backend_type = 'vm'
data_type = data_type.split('.')[1]
_, data_type = data_type.split('_', 1)
else:
if self._backend_type and self._backend_type != 'ge':
raise ProfilerRawFileException('Backend type is inconsistent.')
@ -398,11 +398,11 @@ class FrameworkParser:
data_type = attrs.get('data_type')
data_type = data_type.replace("host.", "")
if data_type.startswith('vm.'):
if data_type.startswith('vm_'):
if self._backend_type and self._backend_type != 'vm':
raise ProfilerRawFileException('Backend type is inconsistent.')
self._backend_type = 'vm'
data_type = data_type.split('.')[1]
_, data_type = data_type.split('_', 1)
else:
if self._backend_type and self._backend_type != 'ge':
raise ProfilerRawFileException('Backend type is inconsistent.')

Loading…
Cancel
Save