From 228b2ed0311ffcf8aca106f53c75d6e383717167 Mon Sep 17 00:00:00 2001 From: zhujingxuan Date: Tue, 28 Sep 2021 11:41:16 +0800 Subject: [PATCH] refactor include files --- .../mkldnn/softmax_cross_entropy_with_logits_cpu_kernel.cc | 1 - .../ccsrc/backend/kernel_compiler/cpu/rank_cpu_kernel.cc | 1 + .../ccsrc/backend/kernel_compiler/cpu/rolling_cpu_kernel.cc | 5 ++--- .../ccsrc/backend/kernel_compiler/cpu/shift_cpu_kernel.cc | 2 -- .../ccsrc/backend/kernel_compiler/cpu/sort_cpu_kernel.cc | 2 -- .../backend/kernel_compiler/cpu/transpose_cpu_kernel.cc | 2 -- mindspore/core/ops/tensor_array.cc | 6 ------ .../lite/src/runtime/kernel/arm/control/tensor_array.cc | 1 - mindspore/lite/tools/optimizer/fisson/node_out_shapes.cc | 1 - .../lite/tools/optimizer/fusion/affine_activation_fusion.cc | 1 - mindspore/lite/tools/optimizer/fusion/affine_fusion.cc | 2 -- 11 files changed, 3 insertions(+), 21 deletions(-) diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/mkldnn/softmax_cross_entropy_with_logits_cpu_kernel.cc b/mindspore/ccsrc/backend/kernel_compiler/cpu/mkldnn/softmax_cross_entropy_with_logits_cpu_kernel.cc index 46295ab2ea1..b78085155b2 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/mkldnn/softmax_cross_entropy_with_logits_cpu_kernel.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/mkldnn/softmax_cross_entropy_with_logits_cpu_kernel.cc @@ -18,7 +18,6 @@ #include #include #include -#include #include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h" #include "runtime/device/cpu/cpu_device_address.h" #include "utils/ms_utils.h" diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/rank_cpu_kernel.cc b/mindspore/ccsrc/backend/kernel_compiler/cpu/rank_cpu_kernel.cc index 64a8d4f0730..c67c7db0ddb 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/rank_cpu_kernel.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/rank_cpu_kernel.cc @@ -14,6 +14,7 @@ * limitations under the License. */ #include "backend/kernel_compiler/cpu/rank_cpu_kernel.h" +#include #include #include #include diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/rolling_cpu_kernel.cc b/mindspore/ccsrc/backend/kernel_compiler/cpu/rolling_cpu_kernel.cc index 562aceeed51..ded56aeb0e8 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/rolling_cpu_kernel.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/rolling_cpu_kernel.cc @@ -14,11 +14,10 @@ * limitations under the License. */ #include "backend/kernel_compiler/cpu/rolling_cpu_kernel.h" -#include -#include +#include #include #include -#include +#include #include "common/thread_pool.h" namespace mindspore { diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/shift_cpu_kernel.cc b/mindspore/ccsrc/backend/kernel_compiler/cpu/shift_cpu_kernel.cc index 7692e95c853..e8d304ac7b4 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/shift_cpu_kernel.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/shift_cpu_kernel.cc @@ -14,8 +14,6 @@ * limitations under the License. */ #include "backend/kernel_compiler/cpu/shift_cpu_kernel.h" -#include -#include #include "common/thread_pool.h" namespace mindspore { diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/sort_cpu_kernel.cc b/mindspore/ccsrc/backend/kernel_compiler/cpu/sort_cpu_kernel.cc index 1e4832a964a..ee1fbf91f3f 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/sort_cpu_kernel.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/sort_cpu_kernel.cc @@ -14,12 +14,10 @@ * limitations under the License. */ #include "backend/kernel_compiler/cpu/sort_cpu_kernel.h" -#include #include "common/thread_pool.h" namespace mindspore { namespace kernel { - template void SortCpuKernel::InitKernel(const CNodePtr &kernel_node) { MS_EXCEPTION_IF_NULL(kernel_node); diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/transpose_cpu_kernel.cc b/mindspore/ccsrc/backend/kernel_compiler/cpu/transpose_cpu_kernel.cc index 6cea9bc661f..1706c70d488 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/transpose_cpu_kernel.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/transpose_cpu_kernel.cc @@ -15,13 +15,11 @@ */ #include "backend/kernel_compiler/cpu/transpose_cpu_kernel.h" -#include #include #include "runtime/device/cpu/cpu_device_address.h" #include "common/thread_pool.h" #include "nnacl/fp32/transpose_fp32.h" #include "nnacl/int8/transpose_int8.h" -#include "nnacl/errorcode.h" namespace mindspore { namespace kernel { diff --git a/mindspore/core/ops/tensor_array.cc b/mindspore/core/ops/tensor_array.cc index dcb000d70fd..ccb8dfd075d 100644 --- a/mindspore/core/ops/tensor_array.cc +++ b/mindspore/core/ops/tensor_array.cc @@ -15,13 +15,7 @@ */ #include "ops/tensor_array.h" -#include -#include -#include -#include #include -#include "ops/op_utils.h" -#include "utils/check_convert_utils.h" #include "abstract/primitive_infer_map.h" namespace mindspore { diff --git a/mindspore/lite/src/runtime/kernel/arm/control/tensor_array.cc b/mindspore/lite/src/runtime/kernel/arm/control/tensor_array.cc index 893264d8ab0..81b541c8242 100644 --- a/mindspore/lite/src/runtime/kernel/arm/control/tensor_array.cc +++ b/mindspore/lite/src/runtime/kernel/arm/control/tensor_array.cc @@ -15,7 +15,6 @@ */ #include -#include #include "include/errorcode.h" #include "src/runtime/kernel/arm/control/tensor_array.h" #include "schema/model_generated.h" diff --git a/mindspore/lite/tools/optimizer/fisson/node_out_shapes.cc b/mindspore/lite/tools/optimizer/fisson/node_out_shapes.cc index 414ee10eec6..1ab778af343 100644 --- a/mindspore/lite/tools/optimizer/fisson/node_out_shapes.cc +++ b/mindspore/lite/tools/optimizer/fisson/node_out_shapes.cc @@ -16,7 +16,6 @@ #include "tools/optimizer/fisson/node_out_shapes.h" #include -#include #include "tools/optimizer/parallel/spliter.h" #include "nnacl/op_base.h" diff --git a/mindspore/lite/tools/optimizer/fusion/affine_activation_fusion.cc b/mindspore/lite/tools/optimizer/fusion/affine_activation_fusion.cc index 61ad8d364c1..8fb89a3491f 100644 --- a/mindspore/lite/tools/optimizer/fusion/affine_activation_fusion.cc +++ b/mindspore/lite/tools/optimizer/fusion/affine_activation_fusion.cc @@ -15,7 +15,6 @@ */ #include "tools/optimizer/fusion/affine_activation_fusion.h" -#include #include "tools/optimizer/common/gllo_utils.h" #include "ops/fusion/activation.h" #include "ops/affine.h" diff --git a/mindspore/lite/tools/optimizer/fusion/affine_fusion.cc b/mindspore/lite/tools/optimizer/fusion/affine_fusion.cc index fc9e5baadf5..316ae2cc325 100644 --- a/mindspore/lite/tools/optimizer/fusion/affine_fusion.cc +++ b/mindspore/lite/tools/optimizer/fusion/affine_fusion.cc @@ -14,8 +14,6 @@ * limitations under the License. */ #include "tools/optimizer/fusion/affine_fusion.h" -#include -#include #include "schema/inner/model_generated.h" #include "ops/affine.h" #include "src/common/log_adapter.h"