Browse Source

!11030 Change tag name of profiling reporter

From: @jojobugfree
Reviewed-by: @kisnwang,@zhoufeng54
Signed-off-by: @zhoufeng54
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 4 years ago
parent
commit
f802f3b3ff
10 changed files with 7 additions and 7 deletions
  1. +3
    -3
      mindspore/ccsrc/runtime/device/ascend/profiling/profiling_utils.cc
  2. +4
    -4
      mindspore/profiler/parser/framework_parser.py
  3. +0
    -0
      tests/ut/data/profiler_data/JOB1/Framework.host.vm_graph_desc_info.0.slice_0
  4. +0
    -0
      tests/ut/data/profiler_data/JOB1/Framework.host.vm_graph_desc_info.0.slice_0.done
  5. +0
    -0
      tests/ut/data/profiler_data/JOB1/Framework.host.vm_task_desc_info.0.slice_0
  6. +0
    -0
      tests/ut/data/profiler_data/JOB4/data/Framework.host.vm_graph_desc_info.0.slice_0
  7. +0
    -0
      tests/ut/data/profiler_data/JOB4/data/Framework.host.vm_point.0.slice_0
  8. +0
    -0
      tests/ut/data/profiler_data/JOB4/data/Framework.host.vm_task_desc_info.0.slice_0
  9. +0
    -0
      tests/ut/data/profiler_data/container/0/data/Framework.host.vm_graph_desc_info.0.JOB2.slice_0
  10. +0
    -0
      tests/ut/data/profiler_data/container/0/data/Framework.host.vm_task_desc_info.0.JOB2.slice_0

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

@@ -374,12 +374,12 @@ void ProfilingUtils::ReportProfilingData(const std::vector<uint32_t> &task_ids,


auto context = MsContext::GetInstance(); auto context = MsContext::GetInstance();
MS_EXCEPTION_IF_NULL(context); 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_task_ids(task_ids);
task_reporter.set_stream_ids(stream_ids); task_reporter.set_stream_ids(stream_ids);
task_reporter.ReportData(); 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_profiling_cnode_.erase(ret);
graph_reporter.ReportData(); 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"; MS_LOG(ERROR) << "Graph id not found in graph_point";
return; 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) { for (const auto &point : point_iter->second) {
point_reporter.AddReportData(point); point_reporter.AddReportData(point);
} }


+ 4
- 4
mindspore/profiler/parser/framework_parser.py View File

@@ -340,11 +340,11 @@ class FrameworkParser:


data_type = attrs.get('data_type') data_type = attrs.get('data_type')
data_type = data_type.replace("host.", "") 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': if self._backend_type and self._backend_type != 'vm':
raise ProfilerRawFileException('Backend type is inconsistent.') raise ProfilerRawFileException('Backend type is inconsistent.')
self._backend_type = 'vm' self._backend_type = 'vm'
data_type = data_type.split('.')[1]
_, data_type = data_type.split('_', 1)
else: else:
if self._backend_type and self._backend_type != 'ge': if self._backend_type and self._backend_type != 'ge':
raise ProfilerRawFileException('Backend type is inconsistent.') raise ProfilerRawFileException('Backend type is inconsistent.')
@@ -398,11 +398,11 @@ class FrameworkParser:


data_type = attrs.get('data_type') data_type = attrs.get('data_type')
data_type = data_type.replace("host.", "") 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': if self._backend_type and self._backend_type != 'vm':
raise ProfilerRawFileException('Backend type is inconsistent.') raise ProfilerRawFileException('Backend type is inconsistent.')
self._backend_type = 'vm' self._backend_type = 'vm'
data_type = data_type.split('.')[1]
_, data_type = data_type.split('_', 1)
else: else:
if self._backend_type and self._backend_type != 'ge': if self._backend_type and self._backend_type != 'ge':
raise ProfilerRawFileException('Backend type is inconsistent.') raise ProfilerRawFileException('Backend type is inconsistent.')


tests/ut/data/profiler_data/JOB1/Framework.host.vm.graph_desc_info.0.slice_0 → tests/ut/data/profiler_data/JOB1/Framework.host.vm_graph_desc_info.0.slice_0 View File


tests/ut/data/profiler_data/JOB1/Framework.host.vm.graph_desc_info.0.slice_0.done → tests/ut/data/profiler_data/JOB1/Framework.host.vm_graph_desc_info.0.slice_0.done View File


tests/ut/data/profiler_data/JOB1/Framework.host.vm.task_desc_info.0.slice_0 → tests/ut/data/profiler_data/JOB1/Framework.host.vm_task_desc_info.0.slice_0 View File


tests/ut/data/profiler_data/JOB4/data/Framework.host.vm.graph_desc_info.0.slice_0 → tests/ut/data/profiler_data/JOB4/data/Framework.host.vm_graph_desc_info.0.slice_0 View File


tests/ut/data/profiler_data/JOB4/data/Framework.host.vm.point.0.slice_0 → tests/ut/data/profiler_data/JOB4/data/Framework.host.vm_point.0.slice_0 View File


tests/ut/data/profiler_data/JOB4/data/Framework.host.vm.task_desc_info.0.slice_0 → tests/ut/data/profiler_data/JOB4/data/Framework.host.vm_task_desc_info.0.slice_0 View File


tests/ut/data/profiler_data/container/0/data/Framework.host.vm.graph_desc_info.0.JOB2.slice_0 → tests/ut/data/profiler_data/container/0/data/Framework.host.vm_graph_desc_info.0.JOB2.slice_0 View File


tests/ut/data/profiler_data/container/0/data/Framework.host.vm.task_desc_info.0.JOB2.slice_0 → tests/ut/data/profiler_data/container/0/data/Framework.host.vm_task_desc_info.0.JOB2.slice_0 View File


Loading…
Cancel
Save