!23542 fix pclint in profiler

Merge pull request !23542 from yanghaitao/yht_fix_issue_0915
This commit is contained in:
i-robot 2021-09-16 12:02:35 +00:00 committed by Gitee
commit a009c8e8b4
3 changed files with 6 additions and 5 deletions

View File

@ -111,6 +111,8 @@ class DataSaver {
void ParseOpInfo(const OpInfoMap &op_info_maps);
OpTimestampInfo op_timestamps_map_;
protected:
void AddOpDetailInfoForType(const OpDetailInfo &op_detail_info);
@ -126,7 +128,6 @@ class DataSaver {
OpTypeInfos op_type_infos_;
OpDetailInfos op_detail_infos_;
OpTimestampInfo op_timestamps_map_;
std::string op_side_;
std::string device_id_;
};

View File

@ -95,7 +95,7 @@ std::shared_ptr<ProfilerManager> &ProfilerManager::GetInstance() {
return profiler_manager_inst_;
}
bool ProfilerManager::GetProfilingEnableFlag() {
bool ProfilerManager::GetProfilingEnableFlag() const {
#if ENABLE_GPU
return profiler::gpu::GPUProfiler::GetInstance()->GetEnableFlag();
#endif
@ -107,7 +107,7 @@ bool ProfilerManager::GetProfilingEnableFlag() {
return false;
}
void ProfilerManager::RecordOneStepStartEndInfo() {
void ProfilerManager::RecordOneStepStartEndInfo() const {
#if ENABLE_GPU
auto gpu_profiler_inst = profiler::gpu::GPUProfiler::GetInstance();
if (gpu_profiler_inst->GetEnableFlag()) {

View File

@ -59,8 +59,8 @@ class ProfilerManager {
~ProfilerManager() = default;
ProfilerManager(const ProfilerManager &) = delete;
ProfilerManager &operator=(const ProfilerManager &) = delete;
bool GetProfilingEnableFlag();
void RecordOneStepStartEndInfo();
bool GetProfilingEnableFlag() const;
void RecordOneStepStartEndInfo() const;
std::string GetProfilingOptions() const;
private: