|
|
@@ -66,9 +66,12 @@ const std::string kIdx = "idx"; |
|
|
|
|
|
|
|
namespace ge { |
|
|
|
ProfilingManager::ProfilingManager() |
|
|
|
: is_load_profiling_(false), is_execute_profiling_(false), is_training_trace_(false), subscribe_count_(0) { |
|
|
|
prof_cb_.msprofCtrlCallback = nullptr; |
|
|
|
prof_cb_.msprofReporterCallback = nullptr; |
|
|
|
: is_load_profiling_(false), |
|
|
|
is_execute_profiling_(false), |
|
|
|
is_training_trace_(false), |
|
|
|
subscribe_count_(0), |
|
|
|
prof_cb_({nullptr, nullptr}), |
|
|
|
cur_iter_num_(UINT64_MAX) { |
|
|
|
} |
|
|
|
|
|
|
|
ProfilingManager::~ProfilingManager() {} |
|
|
@@ -323,6 +326,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void ProfilingManager::Profilin |
|
|
|
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfilingManager::ProfileStepInfo( |
|
|
|
uint64_t index_id, uint64_t model_id, uint16_t tag_id, rtStream_t stream, int32_t device_id) { |
|
|
|
#ifdef DAVINCI_SUPPORT_PROFILING |
|
|
|
cur_iter_num_ = index_id; |
|
|
|
if (!is_load_profiling_ && subscribe_count_ == 0) { |
|
|
|
GELOGD("Profiling is not turned on, no need to profile step info."); |
|
|
|
return SUCCESS; |
|
|
@@ -604,6 +608,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfilingManager::ProfFi |
|
|
|
is_load_profiling_ = false; |
|
|
|
is_training_trace_ = false; |
|
|
|
is_execute_profiling_ = false; |
|
|
|
cur_iter_num_ = UINT64_MAX; |
|
|
|
|
|
|
|
// profiling plugin uninit |
|
|
|
PluginUnInit(); |
|
|
|