diff --git a/mindspore/ccsrc/backend/kernel_compiler/aicpu/aicpu_kernel_build.cc b/mindspore/ccsrc/backend/kernel_compiler/aicpu/aicpu_kernel_build.cc index 8d2e16c4f7..d45df4109d 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/aicpu/aicpu_kernel_build.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/aicpu/aicpu_kernel_build.cc @@ -133,7 +133,7 @@ void ParseAttrValue(const std::string &type, const std::string &attr_name, const MS_EXCEPTION_IF_NULL(value_type); auto value_type_str = value_type->ToString(); if (value_type_str == "Int64") { - int64_t data = GetValue(value); + auto data = GetValue(value); attr_value.push_back(data); } else { attr_value = GetValue>(value); @@ -291,11 +291,11 @@ bool CreateNodeDefBytes(const std::shared_ptr &anf_node, uint64_t SetExtInfoShapeType(char *ext_info_buf, uint64_t ext_info_offset) { // deal1: unknown shape type - ExtInfo *info = reinterpret_cast(ext_info_buf + ext_info_offset); + auto *info = reinterpret_cast(ext_info_buf + ext_info_offset); info->infoType = FWK_ADPT_EXT_SHAPE_TYPE; info->infoLen = sizeof(int32_t); ext_info_offset += kExtInfoHeadSize; - int32_t *shape_type = reinterpret_cast(ext_info_buf + ext_info_offset); + auto *shape_type = reinterpret_cast(ext_info_buf + ext_info_offset); *shape_type = UnknowShapeOpType::DEPEND_COMPUTE; ext_info_offset += info->infoLen; return ext_info_offset; @@ -304,12 +304,12 @@ uint64_t SetExtInfoShapeType(char *ext_info_buf, uint64_t ext_info_offset) { uint64_t SetExtInfoInputShapeType(char *ext_info_buf, uint64_t ext_info_offset, const std::shared_ptr &anf_node, size_t input_num) { // deal2:input ShapeAndType - ExtInfo *info = reinterpret_cast(ext_info_buf + ext_info_offset); + auto *info = reinterpret_cast(ext_info_buf + ext_info_offset); info->infoType = FWK_ADPT_EXT_INPUT_SHAPE; info->infoLen = input_num * sizeof(ShapeAndType); ext_info_offset += kExtInfoHeadSize; - ShapeAndType *inputs = reinterpret_cast(ext_info_buf + ext_info_offset); + auto *inputs = reinterpret_cast(ext_info_buf + ext_info_offset); for (size_t input_index = 0; input_index < input_num; input_index++) { TypeId input_type = AnfAlgo::GetInputDeviceDataType(anf_node, input_index); std::vector input_shape; @@ -344,12 +344,12 @@ uint64_t SetExtInfoInputShapeType(char *ext_info_buf, uint64_t ext_info_offset, uint64_t SetExtInfoOutputShapeType(char *ext_info_buf, uint64_t ext_info_offset, const std::shared_ptr &anf_node, size_t output_num) { // deal3:output ShapeAndType - ExtInfo *info = reinterpret_cast(ext_info_buf + ext_info_offset); + auto *info = reinterpret_cast(ext_info_buf + ext_info_offset); info->infoType = FWK_ADPT_EXT_OUTPUT_SHAPE; info->infoLen = output_num * sizeof(ShapeAndType); ext_info_offset += kExtInfoHeadSize; - ShapeAndType *outputs = reinterpret_cast(ext_info_buf + ext_info_offset); + auto *outputs = reinterpret_cast(ext_info_buf + ext_info_offset); for (size_t output_index = 0; output_index < output_num; output_index++) { std::vector output_shape = AnfAlgo::GetOutputDeviceShape(anf_node, output_index); TypeId output_type = AnfAlgo::GetOutputDeviceDataType(anf_node, output_index); diff --git a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_dynaminc_shape_util.cc b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_dynaminc_shape_util.cc index e90a17b414..c3efd04ebf 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_dynaminc_shape_util.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_dynaminc_shape_util.cc @@ -24,7 +24,6 @@ namespace mindspore { namespace kernel { namespace tbe { - bool TbeDynamicShapeUtil::IsDynamicShapeNode(const CNodePtr &cnode) { MS_EXCEPTION_IF_NULL(cnode); auto input_num = AnfAlgo ::GetInputTensorNum(cnode); @@ -133,7 +132,6 @@ std::vector> TbeDynamicShapeUtil::GetOutputDynamicRange(cons } return ret; } - } // namespace tbe } // namespace kernel } // namespace mindspore diff --git a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_dynaminc_shape_util.h b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_dynaminc_shape_util.h index c37846796e..636f420b91 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_dynaminc_shape_util.h +++ b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_dynaminc_shape_util.h @@ -26,7 +26,6 @@ namespace mindspore { namespace kernel { namespace tbe { - class TbeDynamicShapeUtil { public: TbeDynamicShapeUtil() = default; @@ -41,7 +40,6 @@ class TbeDynamicShapeUtil { static std::vector> GetInputDynamicRange(const AnfNodePtr &anf_node, size_t index); static std::vector> GetOutputDynamicRange(const AnfNodePtr &anf_node, size_t index); }; - } // namespace tbe } // namespace kernel } // namespace mindspore diff --git a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_parallel_build.cc b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_parallel_build.cc index 04676a02c6..98e86d815d 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_parallel_build.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_parallel_build.cc @@ -261,6 +261,5 @@ std::string ParallelBuildManager::ProcessBuildRetStr(const std::string &build_re } return ""; } - } // namespace kernel } // namespace mindspore diff --git a/mindspore/ccsrc/debug/data_dump/dump_json_parser.cc b/mindspore/ccsrc/debug/data_dump/dump_json_parser.cc index c1cce07bf5..7d79c8c68f 100644 --- a/mindspore/ccsrc/debug/data_dump/dump_json_parser.cc +++ b/mindspore/ccsrc/debug/data_dump/dump_json_parser.cc @@ -59,9 +59,9 @@ std::string GetIfstreamString(const std::ifstream &ifstream) { bool DumpJsonParser::IsDumpEnabled() { auto config_path = std::getenv(kMindsporeDumpConfig); if (config_path == nullptr) { - MS_LOG(INFO) << "Dump config path is null"; return false; } + MS_LOG(INFO) << "Dump config path is " << config_path; auto context = MsContext::GetInstance(); MS_EXCEPTION_IF_NULL(context); @@ -389,9 +389,9 @@ bool DumpJsonParser::OutputNeedDump() const { void DumpJsonParser::UpdateNeedDumpKernels(NotNull kernel_graph) { if (!async_dump_enabled_) { - MS_LOG(INFO) << "E2e dump no need to update dump kernel list"; return; } + MS_LOG(INFO) << "Update async dump kernel list for hccl"; std::map update_kernels; for (const auto &kernel : kernel_graph->execution_order()) { MS_EXCEPTION_IF_NULL(kernel); diff --git a/mindspore/ccsrc/debug/data_dump/e2e_dump_util.cc b/mindspore/ccsrc/debug/data_dump/e2e_dump_util.cc index 72b060e3ef..d064c2ffac 100644 --- a/mindspore/ccsrc/debug/data_dump/e2e_dump_util.cc +++ b/mindspore/ccsrc/debug/data_dump/e2e_dump_util.cc @@ -314,9 +314,9 @@ bool E2eDumpUtil::DumpData(const session::KernelGraph *graph, uint32_t device_id dump_json_parser.UpdateDumpIter(); auto dump_flag = dump_json_parser.e2e_dump_enabled(); if (!dump_flag) { - MS_LOG(INFO) << "E2e dump is disabled, skip dump step"; return true; } + MS_LOG(INFO) << "E2e dump data start"; if (dump_json_parser.iteration() != 0) { if (dump_json_parser.cur_dump_iter() != dump_json_parser.iteration()) { 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 98cc3f5964..4de335f020 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 @@ -113,13 +113,13 @@ void AiCoreDynamicKernel::UpdateArgs() { runtime_args_.clear(); (void)std::transform(std::begin(kernel_inputs), std::end(kernel_inputs), std::back_inserter(runtime_args_), - [](const AddressPtr &input) -> void * { return input->addr; }); + [](const AddressPtr &input) { return input->addr; }); (void)std::transform(std::begin(kernel_outputs), std::end(kernel_outputs), std::back_inserter(runtime_args_), - [](const AddressPtr &output) -> void * { return output->addr; }); + [](const AddressPtr &output) { return output->addr; }); // Update workspace if (!workspace_addr_.empty()) { (void)std::transform(std::begin(workspace_addr_), std::end(workspace_addr_), std::back_inserter(runtime_args_), - [](const DeviceAddressPtr &address_ptr) -> void * { return address_ptr->GetMutablePtr(); }); + [](const DeviceAddressPtr &address_ptr) { return address_ptr->GetMutablePtr(); }); } if (is_dynamic_shape_ && !tiling_data_.empty() && tiling_data_ptr_ != nullptr) { diff --git a/mindspore/ccsrc/runtime/device/executor/dynamic_kernel.h b/mindspore/ccsrc/runtime/device/executor/dynamic_kernel.h index 649358d1a7..fc1f37fdf9 100644 --- a/mindspore/ccsrc/runtime/device/executor/dynamic_kernel.h +++ b/mindspore/ccsrc/runtime/device/executor/dynamic_kernel.h @@ -26,7 +26,6 @@ namespace mindspore { namespace device { - constexpr auto kDynamicShapeDepends = "dynamic_shape_depends"; class DynamicKernel {