diff --git a/cmake/external_libs/mkl_dnn.cmake b/cmake/external_libs/mkl_dnn.cmake index be69f0296c0..f3c8452f0a1 100644 --- a/cmake/external_libs/mkl_dnn.cmake +++ b/cmake/external_libs/mkl_dnn.cmake @@ -2,22 +2,22 @@ set(onednn_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2") set(onednn_CFLAGS "-D_FORTIFY_SOURCE=2 -O2") if(CMAKE_SYSTEM_NAME MATCHES "Windows") mindspore_add_pkg(onednn - VER 2.2 + VER 2.4.4 LIBS dnnl mkldnn HEAD_ONLY ./include RELEASE on - URL https://github.com/oneapi-src/oneDNN/releases/download/v2.2/dnnl_win_2.2.0_cpu_vcomp.zip + URL https://github.com/oneapi-src/oneDNN/releases/download/v2.4/dnnl_win_2.4.4_cpu_vcomp.zip MD5 fa12c693b2ec07700d174e1e99d60a7e) else() if(ENABLE_GITEE) - set(REQ_URL "https://gitee.com/mirrors/MKL-DNN/repository/archive/v2.2.tar.gz") - set(MD5 "49c650e0cc24ef9ae7033d4cb22ebfad") + set(REQ_URL "https://gitee.com/mirrors/MKL-DNN/repository/archive/v2.4.4.tar.gz") + set(MD5 "8789434977e918f45cc430277c8eb803") else() - set(REQ_URL "https://github.com/oneapi-src/oneDNN/archive/v2.2.tar.gz") - set(MD5 "6a062e36ea1bee03ff55bf44ee243e27") + set(REQ_URL "https://github.com/oneapi-src/oneDNN/archive/v2.4.4.tar.gz") + set(MD5 "791bbe23cba4a6de22d20a0e1f72a077") endif() mindspore_add_pkg(onednn - VER 2.2 + VER 2.4.4 LIBS dnnl mkldnn URL ${REQ_URL} MD5 ${MD5} diff --git a/cmake/package.cmake b/cmake/package.cmake index b080245ba91..054ee0b0ec5 100644 --- a/cmake/package.cmake +++ b/cmake/package.cmake @@ -148,7 +148,7 @@ endif() if(ENABLE_CPU) if(CMAKE_SYSTEM_NAME MATCHES "Linux") - install(FILES ${onednn_LIBPATH}/libdnnl.so.2.2 + install(FILES ${onednn_LIBPATH}/libdnnl.so.2.4 DESTINATION ${INSTALL_LIB_DIR} RENAME libdnnl.so.2 COMPONENT mindspore) elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") file(GLOB_RECURSE DNNL_LIB_LIST ${onednn_LIBPATH}/libdnnl*${CMAKE_SHARED_LIBRARY_SUFFIX}*) diff --git a/mindspore/ccsrc/backend/optimizer/graph_kernel/parallel_fusion.cc b/mindspore/ccsrc/backend/optimizer/graph_kernel/parallel_fusion.cc index dd9917f006a..9f0e16aea77 100644 --- a/mindspore/ccsrc/backend/optimizer/graph_kernel/parallel_fusion.cc +++ b/mindspore/ccsrc/backend/optimizer/graph_kernel/parallel_fusion.cc @@ -392,12 +392,12 @@ void DumpParallelGroups(const std::vector> &groups, MS_LOG(INFO) << "[" << title << "]" << "There are " << groups.size() << " parallel groups, their detail is: "; int i = 0; - for (const auto group : groups) { + for (const auto &group : groups) { std::stringstream buf; buf << "[" << i << " group] " << group.size() << ":\n"; - for (const auto nodes : group) { + for (const auto &nodes : group) { buf << " " << nodes.size() << ": [<"; - for (const auto node : nodes) { + for (const auto &node : nodes) { buf << "(" << DumpNode(node) << ") -> "; } buf << ">]\n"; diff --git a/mindspore/ccsrc/debug/env_config_parser.h b/mindspore/ccsrc/debug/env_config_parser.h index 446b91d3cfd..9397cddf36f 100644 --- a/mindspore/ccsrc/debug/env_config_parser.h +++ b/mindspore/ccsrc/debug/env_config_parser.h @@ -20,6 +20,7 @@ #include #include #include +#include #include "nlohmann/json.hpp" #include "utils/ms_utils.h" namespace mindspore { diff --git a/mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_cost.h b/mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_cost.h index 7e9b20dec98..508d2963f80 100644 --- a/mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_cost.h +++ b/mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_cost.h @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include "frontend/parallel/auto_parallel/rec_core/rec_graph.h" #include "frontend/parallel/auto_parallel/rec_core/rec_strategy.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/dataset_iterator.cc b/mindspore/ccsrc/minddata/dataset/engine/dataset_iterator.cc index 4996268885e..29486b84701 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/dataset_iterator.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/dataset_iterator.cc @@ -59,7 +59,7 @@ Status DatasetIterator::GetNextAsMap(TensorMap *out_map) { } // Populate the out map from the row and return it - for (const auto colMap : col_name_id_map_) { + for (const auto &colMap : col_name_id_map_) { std::string column_name = colMap.first; // Need to filter meta column start with kDftMetaColumnPrefix size_t pos = column_name.find(kDftMetaColumnPrefix); diff --git a/mindspore/ccsrc/minddata/dataset/engine/gnn/graph_data_service_impl.cc b/mindspore/ccsrc/minddata/dataset/engine/gnn/graph_data_service_impl.cc index 035c4bfac78..01a0867fb86 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/gnn/graph_data_service_impl.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/gnn/graph_data_service_impl.cc @@ -45,13 +45,13 @@ GraphDataServiceImpl::GraphDataServiceImpl(GraphDataServer *server, GraphDataImp Status GraphDataServiceImpl::FillDefaultFeature(GnnClientRegisterResponsePb *response) { const auto default_node_features = graph_data_impl_->GetAllDefaultNodeFeatures(); - for (const auto feature : *default_node_features) { + for (const auto &feature : *default_node_features) { GnnFeatureInfoPb *feature_info = response->add_default_node_feature(); feature_info->set_type(feature.first); RETURN_IF_NOT_OK(TensorToPb(feature.second->Value(), feature_info->mutable_feature())); } const auto default_edge_features = graph_data_impl_->GetAllDefaultEdgeFeatures(); - for (const auto feature : *default_edge_features) { + for (const auto &feature : *default_edge_features) { GnnFeatureInfoPb *feature_info = response->add_default_edge_feature(); feature_info->set_type(feature.first); RETURN_IF_NOT_OK(TensorToPb(feature.second->Value(), feature_info->mutable_feature())); diff --git a/mindspore/ccsrc/ps/core/file_configuration.cc b/mindspore/ccsrc/ps/core/file_configuration.cc index e9732745696..ad8026cde9e 100644 --- a/mindspore/ccsrc/ps/core/file_configuration.cc +++ b/mindspore/ccsrc/ps/core/file_configuration.cc @@ -102,7 +102,7 @@ void FileConfiguration::PersistNodes(const core::ClusterConfig &clusterConfig) c persist_js[kRecoveryNextServerRankId] = clusterConfig.initial_next_server_rank_id; auto node_infos = clusterConfig.initial_registered_nodes_infos; - for (const auto kvs : node_infos) { + for (const auto &kvs : node_infos) { std::unordered_map res; res["ip"] = kvs.second.ip_; res["port"] = std::to_string(kvs.second.port_); diff --git a/mindspore/ccsrc/ps/core/scheduler_node.cc b/mindspore/ccsrc/ps/core/scheduler_node.cc index 92bb6873ace..2b815878661 100644 --- a/mindspore/ccsrc/ps/core/scheduler_node.cc +++ b/mindspore/ccsrc/ps/core/scheduler_node.cc @@ -92,7 +92,7 @@ void SchedulerNode::RunRecovery() { node_manager_.set_next_server_rank_id(clusterConfig.initial_next_server_rank_id); node_manager_.set_total_node_num(clusterConfig.initial_total_node_num); - for (const auto kvs : initial_node_infos) { + for (const auto &kvs : initial_node_infos) { auto client = std::make_shared(kvs.second.ip_, kvs.second.port_, config_.get()); client->SetMessageCallback( [&](const std::shared_ptr &meta, const Protos &protos, const void *data, size_t size) { @@ -1348,7 +1348,7 @@ void SchedulerNode::BroadcastTimeoutEvent() { auto initial_node_infos = clusterConfig.initial_registered_nodes_infos; const uint32_t event = static_cast(ps::UserDefineEvent::kNodeTimeout); MS_LOG(INFO) << "Broad timeout event:" << event; - for (const auto kvs : initial_node_infos) { + for (const auto &kvs : initial_node_infos) { auto client = GetOrCreateClient(kvs.second); SendEvent(client, event); } diff --git a/mindspore/ccsrc/ps/core/scheduler_recovery.cc b/mindspore/ccsrc/ps/core/scheduler_recovery.cc index e0422f1d5ee..962612a2ddf 100644 --- a/mindspore/ccsrc/ps/core/scheduler_recovery.cc +++ b/mindspore/ccsrc/ps/core/scheduler_recovery.cc @@ -118,7 +118,7 @@ bool SchedulerRecovery::Recover() { << ", the initial next server rank id:" << clusterConfig.initial_next_server_rank_id; if (!clusterConfig.initial_registered_nodes_infos.empty()) { - for (const auto kvs : clusterConfig.initial_registered_nodes_infos) { + for (const auto &kvs : clusterConfig.initial_registered_nodes_infos) { MS_LOG(INFO) << "The ip:" << kvs.second.ip_ << ", the port:" << kvs.second.port_ << ", the node_id:" << kvs.second.node_id_ << ", the node_role:" << CommUtil::NodeRoleToString(kvs.second.node_role_) diff --git a/mindspore/ccsrc/ps/random_normal/random_normal.h b/mindspore/ccsrc/ps/random_normal/random_normal.h index 9e432f73d6f..ae2ef327b8c 100644 --- a/mindspore/ccsrc/ps/random_normal/random_normal.h +++ b/mindspore/ccsrc/ps/random_normal/random_normal.h @@ -16,6 +16,7 @@ #ifndef MINDSPORE_CCSRC_PS_RANDOM_NORMAL_RANDOM_NORMAL_H_ #define MINDSPORE_CCSRC_PS_RANDOM_NORMAL_RANDOM_NORMAL_H_ #include +#include namespace mindspore { namespace ps { diff --git a/mindspore/ccsrc/pybind_api/random_normal/philox_generator.h b/mindspore/ccsrc/pybind_api/random_normal/philox_generator.h index 3af1969e1e4..f4617c5d27d 100644 --- a/mindspore/ccsrc/pybind_api/random_normal/philox_generator.h +++ b/mindspore/ccsrc/pybind_api/random_normal/philox_generator.h @@ -18,6 +18,7 @@ #include #include #include +#include namespace mindspore { static constexpr int gResultNum = 4; diff --git a/mindspore/ccsrc/runtime/framework/control_node_parser.cc b/mindspore/ccsrc/runtime/framework/control_node_parser.cc index a20d258c59b..6d873349c03 100644 --- a/mindspore/ccsrc/runtime/framework/control_node_parser.cc +++ b/mindspore/ccsrc/runtime/framework/control_node_parser.cc @@ -149,7 +149,7 @@ std::set GetFuncGraphbyCallNode(const AnfNodePtr &node, std::stack } MS_EXCEPTION_IF_NULL(make_tuple); auto partials = make_tuple->cast()->inputs(); - for (const auto partial : partials) { + for (const auto &partial : partials) { if (IsPartial(partial)) { std::stack tmp_output_indexs; (void)func_graphs.emplace(GetFuncGraphFromPartial(partial, &tmp_output_indexs)); @@ -335,7 +335,7 @@ void FetchWeightbyHostParameter(const AnfNodePtr &node, std::set *de } const auto weight_nodes = iter->second; - for (const auto weight_node : weight_nodes) { + for (const auto &weight_node : weight_nodes) { FetchWeightbyHostParameter(weight_node.first, dest_nodes, front_to_front_weight); } } @@ -1343,7 +1343,7 @@ void ControlNodeParser::ParseFormalToRealParameter(const std::vector const auto &cnode = node->cast(); const auto &inputs = cnode->inputs(); const auto &func_graphs = FetchFuncGraphbyCallNode(node); - for (const auto func_graph : func_graphs) { + for (const auto &func_graph : func_graphs) { const auto ¶meters = func_graph->parameters(); for (size_t i = inputs.size() - 1, j = parameters.size() - 1; i >= kCallInputStartPos && j >= 0; --i, --j) { MS_EXCEPTION_IF_NULL(inputs[i]); @@ -1510,7 +1510,7 @@ void ControlNodeParser::ParseFrontToBackendParameter(const std::vector invalid_call_nodes; FetchRealParameterByNode(front_node_with_index, &real_parameters, &invalid_call_nodes, call_node_to_func_graphs_); - for (const auto real_parameter : real_parameters) { + for (const auto &real_parameter : real_parameters) { if (real_parameter.first->isa() || real_parameter.first->isa()) { front_to_backend_parameters_[real_parameter].emplace(parameter, device_context); } diff --git a/mindspore/ccsrc/runtime/framework/control_node_scheduler.cc b/mindspore/ccsrc/runtime/framework/control_node_scheduler.cc index e69fbb06866..08e35b6cdad 100644 --- a/mindspore/ccsrc/runtime/framework/control_node_scheduler.cc +++ b/mindspore/ccsrc/runtime/framework/control_node_scheduler.cc @@ -973,7 +973,7 @@ void ControlNodeScheduler::LinkControlArrowByAutoMonad(ControlActor *to_actor, c if (func_graphs.empty()) { MS_LOG(EXCEPTION) << "Failed to get funcgraph by call node:" << depend_node->DebugString(); } - for (const auto func_graph : func_graphs) { + for (const auto &func_graph : func_graphs) { auto exit_actor_name = func_graph->ToString() + kExitActorNameSuffix; from_actor = FetchActor(exit_actor_name); MS_EXCEPTION_IF_NULL(from_actor); diff --git a/scripts/build/build_mindspore.sh b/scripts/build/build_mindspore.sh index 4c463a6b1fa..ce93a194ca4 100755 --- a/scripts/build/build_mindspore.sh +++ b/scripts/build/build_mindspore.sh @@ -22,7 +22,7 @@ build_mindspore() echo "start build mindspore project." mkdir -pv "${BUILD_PATH}/mindspore" cd "${BUILD_PATH}/mindspore" - CMAKE_ARGS="-DDEBUG_MODE=$DEBUG_MODE -DBUILD_PATH=$BUILD_PATH" + CMAKE_ARGS="-DDEBUG_MODE=$DEBUG_MODE -DBUILD_PATH=$BUILD_PATH -DCMAKE_EXPORT_COMPILE_COMMAND=ON" if [[ "X$ENABLE_COVERAGE" = "Xon" ]]; then CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_COVERAGE=ON" fi