diff --git a/mindspore/ccsrc/backend/kernel_compiler/akg/akg_kernel_build.h b/mindspore/ccsrc/backend/kernel_compiler/akg/akg_kernel_build.h index dd2bf4fd01..6fe79c6768 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/akg/akg_kernel_build.h +++ b/mindspore/ccsrc/backend/kernel_compiler/akg/akg_kernel_build.h @@ -50,7 +50,6 @@ class AkgKernelBuilder { bool AkgOpParallelBuild(const std::vector &build_args); std::vector repeat_nodes_; }; - } // namespace kernel } // namespace mindspore diff --git a/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_cse.cc b/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_cse.cc index 12ffe5ee75..01c004a06f 100644 --- a/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_cse.cc +++ b/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_cse.cc @@ -78,8 +78,8 @@ bool GraphKernelBackendCSE::CheckEqualKernelBuildInfo(const AnfNodePtr &main, co return BackendCSE::CheckEqualKernelBuildInfo(main, node); } - auto main_kernel_info = dynamic_cast(main->kernel_info()); - auto node_kernel_info = dynamic_cast(node->kernel_info()); + auto main_kernel_info = static_cast(main->kernel_info()); + auto node_kernel_info = static_cast(node->kernel_info()); if (main_kernel_info == nullptr && node_kernel_info == nullptr) { return true; } 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 e8b83187ab..6738b031fa 100644 --- a/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_helper.cc +++ b/mindspore/ccsrc/backend/optimizer/graph_kernel/graph_kernel_helper.cc @@ -621,7 +621,7 @@ std::vector GetFusibleOpList() { bool CheckProcessor(const AnfNodePtr &node, kernel::Processor processor = kernel::Processor::AICORE) { MS_EXCEPTION_IF_NULL(node); - auto node_kernel_info = dynamic_cast(node->kernel_info()); + auto node_kernel_info = static_cast(node->kernel_info()); if (node_kernel_info == nullptr) { return false; } @@ -867,7 +867,6 @@ bool IsKeepBasicNode(const AnfNodePtr &node) { "aggregate", "aggregate_input_indexx"}; static std::vector> attrs_with_value = { [](const AnfNodePtr &n) -> bool { return AnfAlgo::GetBooleanAttr(n, "skip"); }}; - // If node contain attribute in contagious_attrs, it have to keep basic no matter what the value is. // If node contain attribute in attrs_with_value, it only have to keep basic when the check result is true. if (std::any_of(contagious_attrs.cbegin(), contagious_attrs.cend(),