forked from huawei/mindspore2022
fix pclint in profiler
This commit is contained in:
parent
f5bc717c4c
commit
56fd6f57e7
|
|
@ -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_;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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()) {
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue