diff --git a/mindspore/ccsrc/backend/kernel_compiler/akg/akg_kernel_build.cc b/mindspore/ccsrc/backend/kernel_compiler/akg/akg_kernel_build.cc index 6ca258c611d..eb4b226db53 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/akg/akg_kernel_build.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/akg/akg_kernel_build.cc @@ -40,7 +40,6 @@ namespace mindspore { namespace kernel { - constexpr int32_t MAX_ERROR_LEN = 1024; constexpr int32_t PROCESS_NUM = 16; constexpr int32_t TIME_OUT = 300; diff --git a/mindspore/ccsrc/backend/optimizer/graph_kernel/add_stitch_atomic_clean_gpu.cc b/mindspore/ccsrc/backend/optimizer/graph_kernel/add_stitch_atomic_clean_gpu.cc index 60ab651bd6a..70adb6aaa1a 100644 --- a/mindspore/ccsrc/backend/optimizer/graph_kernel/add_stitch_atomic_clean_gpu.cc +++ b/mindspore/ccsrc/backend/optimizer/graph_kernel/add_stitch_atomic_clean_gpu.cc @@ -27,7 +27,6 @@ #include "backend/optimizer/graph_kernel/graph_kernel_helper.h" #include "backend/session/anf_runtime_algorithm.h" #include "backend/session/kernel_graph.h" -#include "debug/anf_ir_dump.h" namespace mindspore::graphkernel { CNodePtr StitchAtomicCleanInsertter::CreateInplaceAssignNode(const FuncGraphPtr &sub_graph, diff --git a/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_helper.cc b/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_helper.cc index 80b584310ba..a2f918dce73 100644 --- a/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_helper.cc +++ b/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_helper.cc @@ -982,7 +982,7 @@ FuncGraphManagerPtr GetFuncGraphManager(const FuncGraphPtr &func_graph) { return manager; } -void UpdateMng(FuncGraphManagerPtr mng, const FuncGraphPtr &func_graph) { +void UpdateMng(const FuncGraphManagerPtr &mng, const FuncGraphPtr &func_graph) { mng->RemoveRoots(); mng->KeepRoots({func_graph}); } diff --git a/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_helper.h b/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_helper.h index 94ce73da87f..aa3688a3710 100644 --- a/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_helper.h +++ b/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_helper.h @@ -144,6 +144,6 @@ std::vector GetValidOps( // return a func_graph's manager FuncGraphManagerPtr GetFuncGraphManager(const FuncGraphPtr &func_graph); -void UpdateMng(FuncGraphManagerPtr mng, const FuncGraphPtr &func_graph); +void UpdateMng(const FuncGraphManagerPtr &mng, const FuncGraphPtr &func_graph); } // namespace mindspore::graphkernel #endif // MINDSPORE_CCSRC_BACKEND_OPTIMIZER_GRAPH_KERNEL_GRAPH_KERNEL_HELPER_H_ diff --git a/mindspore/ccsrc/backend/optimizer/graph_kernel/reorder_ops.cc b/mindspore/ccsrc/backend/optimizer/graph_kernel/reorder_ops.cc index 99a9de8f510..614ad23b313 100644 --- a/mindspore/ccsrc/backend/optimizer/graph_kernel/reorder_ops.cc +++ b/mindspore/ccsrc/backend/optimizer/graph_kernel/reorder_ops.cc @@ -347,7 +347,6 @@ bool ReorderOps::ReorderCastTypeInsensitive(const FuncGraphPtr &func_graph) { } bool ReorderOps::Run(const FuncGraphPtr &func_graph) { - auto mng = GetFuncGraphManager(func_graph); bool changed = false; auto todos = TopoSort(func_graph->get_return()); for (const auto &anf_node : todos) { diff --git a/mindspore/ccsrc/backend/optimizer/graph_kernel/tsa_atomic_add_to_first_tensor.cc b/mindspore/ccsrc/backend/optimizer/graph_kernel/tsa_atomic_add_to_first_tensor.cc index cbccebd3437..e618d5b8603 100644 --- a/mindspore/ccsrc/backend/optimizer/graph_kernel/tsa_atomic_add_to_first_tensor.cc +++ b/mindspore/ccsrc/backend/optimizer/graph_kernel/tsa_atomic_add_to_first_tensor.cc @@ -30,12 +30,11 @@ #include "ir/tensor.h" #include "utils/utils.h" #include "utils/log_adapter.h" +#include "backend/session/anf_runtime_algorithm.h" +#include "backend/session/kernel_graph.h" #include "backend/kernel_compiler/kernel.h" #include "backend/kernel_compiler/common_utils.h" #include "backend/optimizer/graph_kernel/graph_kernel_helper.h" -#include "backend/session/anf_runtime_algorithm.h" -#include "backend/session/kernel_graph.h" -#include "debug/anf_ir_dump.h" namespace mindspore::graphkernel { class TsaChecker : public AtomicAddChecker { @@ -255,8 +254,7 @@ bool TsaAtomicAddToFirstTensor::Run(const FuncGraphPtr &func_graph) { } if (changed) { - mng->RemoveRoots(); - mng->KeepRoots({func_graph}); + UpdateMng(mng, func_graph); } return changed; diff --git a/mindspore/ccsrc/backend/optimizer/graph_kernel/uss_atomic_add.cc b/mindspore/ccsrc/backend/optimizer/graph_kernel/uss_atomic_add.cc index 6eca8f8791a..1824da436b7 100644 --- a/mindspore/ccsrc/backend/optimizer/graph_kernel/uss_atomic_add.cc +++ b/mindspore/ccsrc/backend/optimizer/graph_kernel/uss_atomic_add.cc @@ -29,13 +29,10 @@ #include "base/core_ops.h" #include "ir/tensor.h" #include "utils/utils.h" -#include "utils/log_adapter.h" #include "backend/kernel_compiler/kernel.h" #include "backend/kernel_compiler/common_utils.h" #include "backend/optimizer/graph_kernel/graph_kernel_helper.h" -#include "backend/session/anf_runtime_algorithm.h" #include "backend/session/kernel_graph.h" -#include "debug/anf_ir_dump.h" namespace mindspore::graphkernel { class UssChecker : public AtomicAddChecker {