Browse Source

!9433 remove malfunctioned profiling callback for dynamic shape

From: @nicholas_yhr
Reviewed-by: @kisnwang,@kisnwang,@jjfeing
Signed-off-by: @jjfeing
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
8b404b026c
1 changed files with 0 additions and 23 deletions
  1. +0
    -23
      mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc

+ 0
- 23
mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc View File

@@ -51,9 +51,6 @@
#include "runtime/device/ascend/executor/tiling/op_tiling_calculater.h" #include "runtime/device/ascend/executor/tiling/op_tiling_calculater.h"
#include "runtime/device/executor/executor_callback.h" #include "runtime/device/executor/executor_callback.h"
#include "runtime/device/ascend/executor/hccl_dynamic_kernel.h" #include "runtime/device/ascend/executor/hccl_dynamic_kernel.h"
#include "profiler/device/ascend/ascend_profiling.h"
#include "profiler/device/ascend/profiling_context.h"
#include "profiler/device/ascend/rt_callback_manager.h"
#include "utils/config_manager.h" #include "utils/config_manager.h"
#include "runtime/device/ascend/profiling/reporter/op_name_task_stream_reporter.h" #include "runtime/device/ascend/profiling/reporter/op_name_task_stream_reporter.h"
#include "runtime/hccl_adapter/hccl_adapter.h" #include "runtime/hccl_adapter/hccl_adapter.h"
@@ -64,10 +61,6 @@ using mindspore::device::ascend::ProfilingManager;
using mindspore::device::ascend::ProfilingUtils; using mindspore::device::ascend::ProfilingUtils;
using mindspore::device::ascend::tasksink::TaskGenerator; using mindspore::device::ascend::tasksink::TaskGenerator;
using mindspore::kernel::tbe::TbeUtils; using mindspore::kernel::tbe::TbeUtils;
using mindspore::profiler::ascend::AscendProfiler;
using mindspore::profiler::ascend::CallbackManager;
using mindspore::profiler::ascend::GetTid;
using mindspore::profiler::ascend::kCallback;
using std::vector; using std::vector;


constexpr uint32_t kTupleTaskId = 0; constexpr uint32_t kTupleTaskId = 0;
@@ -619,11 +612,6 @@ bool AscendKernelRuntime::RunDynamicKernelAsync(const session::KernelGraph *grap
return false; return false;
} }


// Profiling Init
auto &async_profiler = AscendProfiler::GetInstance();
auto &rt_callback = CallbackManager::GetInstance(stream_);
rt_callback.Init();

auto dynamic_kernels = iter->second; auto dynamic_kernels = iter->second;
for (const auto &dynamic_kernel : dynamic_kernels) { for (const auto &dynamic_kernel : dynamic_kernels) {
if (dynamic_kernel->have_depends() || dynamic_kernel->GetKernelType() == KernelType::HCCL_KERNEL) { if (dynamic_kernel->have_depends() || dynamic_kernel->GetKernelType() == KernelType::HCCL_KERNEL) {
@@ -639,15 +627,7 @@ bool AscendKernelRuntime::RunDynamicKernelAsync(const session::KernelGraph *grap
dynamic_kernel->UpdateArgs(); dynamic_kernel->UpdateArgs();
} }


// Enable profiling trace point start
rt_callback.RegisterCallback(
[&]() { RECORD_CALLBACK_EVENT(&async_profiler, dynamic_kernel->GetKernelName().c_str(), "[Callback] start"); });

dynamic_kernel->Execute(); dynamic_kernel->Execute();

// Enable profiling trace point end
rt_callback.RegisterCallback(
[&]() { RECORD_CALLBACK_EVENT(&async_profiler, dynamic_kernel->GetKernelName().c_str(), "[Callback] end"); });
dynamic_kernel->PostExecute(); dynamic_kernel->PostExecute();
} }


@@ -656,9 +636,6 @@ bool AscendKernelRuntime::RunDynamicKernelAsync(const session::KernelGraph *grap
return false; return false;
} }


rt_callback.Destroy();
async_profiler.Dump(std::cout);
async_profiler.Reset();
return true; return true;
} }




Loading…
Cancel
Save