From 4540ca00878805fcb9cdbeca5e84311eef06aae3 Mon Sep 17 00:00:00 2001 From: liubuyu Date: Wed, 31 Mar 2021 09:52:49 +0800 Subject: [PATCH] codedex clean --- mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_build.cc | 2 +- .../runtime/device/ascend/executor/ai_core_dynamic_kernel.cc | 1 - .../runtime/device/ascend/executor/ai_core_dynamic_kernel.h | 2 +- mindspore/core/ops/squeeze.h | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_build.cc b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_build.cc index 57aa4ffbd4..3b780c1fbe 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_build.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_build.cc @@ -621,7 +621,7 @@ void TbeKernelJsonCreator::ParseAttrDefaultValue(const std::string &type, const } else if (type == kVTypeStr) { (*attr_obj)[kJValue] = value; } else if (type == kVTypeBool) { - bool attr_value; + bool attr_value = false; std::istringstream(value) >> std::boolalpha >> attr_value; (*attr_obj)[kJValue] = attr_value; } else if (type == kVTypeFloat) { diff --git a/mindspore/ccsrc/runtime/device/ascend/executor/ai_core_dynamic_kernel.cc b/mindspore/ccsrc/runtime/device/ascend/executor/ai_core_dynamic_kernel.cc index 9cf0a54cb2..21fa2d4263 100644 --- a/mindspore/ccsrc/runtime/device/ascend/executor/ai_core_dynamic_kernel.cc +++ b/mindspore/ccsrc/runtime/device/ascend/executor/ai_core_dynamic_kernel.cc @@ -57,7 +57,6 @@ void AiCoreDynamicKernel::Execute() { args_size, l2ctrl, stream_, kernel_info.c_str())) { MS_LOG(EXCEPTION) << "Call runtime rtKernelLaunchWithHandle error."; } - } else { if (RT_ERROR_NONE != rtKernelLaunch(stub_func_, block_dim_, runtime_args_.data(), args_size, l2ctrl, stream_)) { MS_LOG(EXCEPTION) << "Call runtime rtKernelLaunch error."; diff --git a/mindspore/ccsrc/runtime/device/ascend/executor/ai_core_dynamic_kernel.h b/mindspore/ccsrc/runtime/device/ascend/executor/ai_core_dynamic_kernel.h index 95039f8db5..fc19aa0c3a 100644 --- a/mindspore/ccsrc/runtime/device/ascend/executor/ai_core_dynamic_kernel.h +++ b/mindspore/ccsrc/runtime/device/ascend/executor/ai_core_dynamic_kernel.h @@ -61,7 +61,7 @@ class AiCoreDynamicKernel : public DynamicKernel { void ParseCompileJson(); private: - const void *stub_func_; + const void *stub_func_{nullptr}; void *handle_{nullptr}; uint32_t block_dim_; void *tiling_data_ptr_; // device ptr diff --git a/mindspore/core/ops/squeeze.h b/mindspore/core/ops/squeeze.h index df5b30ff85..6a467a7c1d 100644 --- a/mindspore/core/ops/squeeze.h +++ b/mindspore/core/ops/squeeze.h @@ -44,7 +44,6 @@ class Squeeze : public PrimitiveC { AbstractBasePtr SqueezeInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, const std::vector &input_args); using PrimSqueezePtr = std::shared_ptr; - } // namespace ops } // namespace mindspore