From afe3afa034c6b9e7a450b397708561582d7880a3 Mon Sep 17 00:00:00 2001 From: zhangzhaoju Date: Fri, 23 Apr 2021 14:07:20 +0800 Subject: [PATCH] Clean pclint && bot --- mindspore/ccsrc/runtime/device/executor/dynamic_kernel.cc | 2 +- mindspore/ccsrc/runtime/device/executor/dynamic_kernel.h | 4 ++-- mindspore/core/ir/func_graph.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mindspore/ccsrc/runtime/device/executor/dynamic_kernel.cc b/mindspore/ccsrc/runtime/device/executor/dynamic_kernel.cc index 8754a164617..68935ea8963 100644 --- a/mindspore/ccsrc/runtime/device/executor/dynamic_kernel.cc +++ b/mindspore/ccsrc/runtime/device/executor/dynamic_kernel.cc @@ -52,7 +52,7 @@ void DynamicKernel::Initialize() { MS_LOG(INFO) << "Init End"; } -int DynamicKernel::GetKernelType() { return AnfAlgo::GetKernelType(cnode_ptr_.lock()); } +int DynamicKernel::GetKernelType() const { return AnfAlgo::GetKernelType(cnode_ptr_.lock()); } void DynamicKernel::RebuildDependTensor() { depend_tensor_map_.clear(); diff --git a/mindspore/ccsrc/runtime/device/executor/dynamic_kernel.h b/mindspore/ccsrc/runtime/device/executor/dynamic_kernel.h index 73788eaa79b..ae3f09e01e4 100644 --- a/mindspore/ccsrc/runtime/device/executor/dynamic_kernel.h +++ b/mindspore/ccsrc/runtime/device/executor/dynamic_kernel.h @@ -45,8 +45,8 @@ class DynamicKernel { bool is_output_dynamic_shape() const { return is_output_dynamic_shape_; } bool have_depends() const { return !depend_list_.empty(); } virtual void Initialize(); - std::string GetKernelName() { return cnode_ptr_.lock()->fullname_with_scope(); } - int GetKernelType(); + std::string GetKernelName() const { return cnode_ptr_.lock()->fullname_with_scope(); } + int GetKernelType() const; protected: void RebuildDependTensor(); diff --git a/mindspore/core/ir/func_graph.h b/mindspore/core/ir/func_graph.h index 7f1faa9a0fb..422f74f04f1 100644 --- a/mindspore/core/ir/func_graph.h +++ b/mindspore/core/ir/func_graph.h @@ -389,12 +389,12 @@ class FuncGraph : public FuncGraphBase, public EffectInfoHolder { int64_t stage() { return stage_; } void set_stage(int64_t stage) { stage_ = stage; } - bool dropped() { return dropped_; } + bool dropped() const { return dropped_; } void set_dropped(bool dropped) { dropped_ = dropped; } private: // Only used for func_graph manager to control resource free. - int attached_mng_cnt() { return attached_mng_cnt_; } + int attached_mng_cnt() const { return attached_mng_cnt_; } void IncAttachedMngCnt() { attached_mng_cnt_++; } void DecAttachedMngCnt() { attached_mng_cnt_--; } // Clear all info from manager.