From: @zhangzhaoju Reviewed-by: @ginfung,@zh_qh Signed-off-by: @zh_qhpull/15588/MERGE
| @@ -52,7 +52,7 @@ void DynamicKernel::Initialize() { | |||||
| MS_LOG(INFO) << "Init End"; | 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() { | void DynamicKernel::RebuildDependTensor() { | ||||
| depend_tensor_map_.clear(); | depend_tensor_map_.clear(); | ||||
| @@ -45,8 +45,8 @@ class DynamicKernel { | |||||
| bool is_output_dynamic_shape() const { return is_output_dynamic_shape_; } | bool is_output_dynamic_shape() const { return is_output_dynamic_shape_; } | ||||
| bool have_depends() const { return !depend_list_.empty(); } | bool have_depends() const { return !depend_list_.empty(); } | ||||
| virtual void Initialize(); | 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: | protected: | ||||
| void RebuildDependTensor(); | void RebuildDependTensor(); | ||||
| @@ -389,12 +389,12 @@ class FuncGraph : public FuncGraphBase, public EffectInfoHolder { | |||||
| int64_t stage() { return stage_; } | int64_t stage() { return stage_; } | ||||
| void set_stage(int64_t stage) { stage_ = 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; } | void set_dropped(bool dropped) { dropped_ = dropped; } | ||||
| private: | private: | ||||
| // Only used for func_graph manager to control resource free. | // 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 IncAttachedMngCnt() { attached_mng_cnt_++; } | ||||
| void DecAttachedMngCnt() { attached_mng_cnt_--; } | void DecAttachedMngCnt() { attached_mng_cnt_--; } | ||||
| // Clear all info from manager. | // Clear all info from manager. | ||||