diff --git a/mindspore/ccsrc/parallel/context.cc b/mindspore/ccsrc/parallel/context.cc index 74ec948c491a8da71a8494fb0e271f0ad4febeb8..64cecf1669de7f10d9ecec63e371135caad288d8 100644 --- a/mindspore/ccsrc/parallel/context.cc +++ b/mindspore/ccsrc/parallel/context.cc @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "parallel/device_manager.h" diff --git a/mindspore/ccsrc/parallel/context.h b/mindspore/ccsrc/parallel/context.h index 22a5f89e38252434b6d44698bce3a3166f86dbda..866609fbfe96c88167570492c53d8de7cfa3d64d 100644 --- a/mindspore/ccsrc/parallel/context.h +++ b/mindspore/ccsrc/parallel/context.h @@ -20,7 +20,6 @@ #include #include #include -#include #include #include "parallel/status.h" diff --git a/mindspore/ccsrc/parallel/device.h b/mindspore/ccsrc/parallel/device.h index 0373617ad59a91019e68250717dd69957d2155b2..8c3174ae557396b1e7644cdf459e6d0da14d5ab4 100644 --- a/mindspore/ccsrc/parallel/device.h +++ b/mindspore/ccsrc/parallel/device.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_DEVICE_H_ #include -#include #include #include diff --git a/mindspore/ccsrc/parallel/device_manager.cc b/mindspore/ccsrc/parallel/device_manager.cc index 999d6b44325afbc861227ec40039c95795b7c810..3a553e08ece2c42d1566f66ca1399715a82b1769 100644 --- a/mindspore/ccsrc/parallel/device_manager.cc +++ b/mindspore/ccsrc/parallel/device_manager.cc @@ -30,7 +30,7 @@ namespace mindspore { namespace parallel { DeviceManagerPtr g_device_manager = nullptr; -Stage::Stage(const std::list& devices, int num, int rank) +Stage::Stage(const std::vector& devices, int num, int rank) : devices_(devices), number_(num), rank_(rank) { gm_ = GroupManager(); } @@ -104,7 +104,7 @@ int32_t GetListMemberByIndex(size_t index, const RankList& devices) { return result; } -std::shared_ptr GetListMemberByIndex(size_t index, const std::list>& device_list) { +std::shared_ptr GetListMemberByIndex(size_t index, const std::vector>& device_list) { size_t i = 0; std::shared_ptr result; if ((device_list.empty()) || (index >= device_list.size())) { @@ -178,7 +178,7 @@ Status DeviceManager::Init(const RankList& devices, int32_t global_device_rank, MS_LOG(ERROR) << "The number of 'devices' in a stage must be positive"; return Status::FAILED; } - std::list curr_dev_list; + std::vector curr_dev_list; for (int i = 0; i < num_device; ++i) { curr_dev_list.push_back(*GetListMemberByIndex(global_index, devices_)); global_index++; @@ -278,8 +278,8 @@ RankList DeviceManager::global_device_list(int32_t stage_id, int32_t rank, int32 Device DeviceManager::CreateNewDeviceByRank(int32_t rank) const { return Device(rank); } -std::list DeviceManager::CreateDeviceListByRankList(RankList ranks) { - std::list dev_list; +std::vector DeviceManager::CreateDeviceListByRankList(RankList ranks) { + std::vector dev_list; for (auto& rank : ranks) { Device one = CreateNewDeviceByRank(rank); dev_list.push_back(one); @@ -312,8 +312,8 @@ std::string HashName(const std::string& origin_name) { return std::to_string(std // is '0-1-3-5-7'. std::string DeviceManager::GenerateGroupNameByRanks(RankList ranks) { std::string rank_list_name; - std::list::iterator it; - ranks.sort(); // sorted in increasing order + std::vector::iterator it; + std::sort(ranks.begin(), ranks.end()); // sorted in increasing order for (it = ranks.begin(); it != ranks.end(); ++it) { if (it == ranks.begin()) { rank_list_name = std::to_string(*it); @@ -343,7 +343,8 @@ std::string DeviceManager::GenerateGroupNameByRanks(RankList ranks) { // Create the group with the given devices and the given name. The GroupManager // gm_ will create a new group only if there does not exit a group with the same // name. Otherwise, let the pointer g point to that group. -Group DeviceManager::CreateGroup(const std::string& group_name, const std::list& devices) { +Group DeviceManager::CreateGroup(const std::string& group_name, + const std::vector& devices) { if ((world_group() == NCCL_WORLD_GROUP) && (devices.size() != devices_.size())) { MS_LOG(EXCEPTION) << "Do not support sub group for nccl"; } @@ -360,7 +361,7 @@ Group DeviceManager::CreateGroup(const RankList& dev_ranks) { } std::string group_name = GenerateGroupNameByRanks(dev_ranks); - std::list dev_list = CreateDeviceListByRankList(dev_ranks); + auto dev_list = CreateDeviceListByRankList(dev_ranks); return CreateGroup(group_name, dev_list); } diff --git a/mindspore/ccsrc/parallel/device_manager.h b/mindspore/ccsrc/parallel/device_manager.h index 80beb15f86259831a3b45f5aec00b26fc7fd09da..798d99383de6744e4c803892fe49318fc3a0acf5 100644 --- a/mindspore/ccsrc/parallel/device_manager.h +++ b/mindspore/ccsrc/parallel/device_manager.h @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include @@ -50,19 +50,19 @@ class Stage { // This class is used in pipeline-parallelization. Available devices are partitioned into multiple stages. // Currently, the function of pipeline-parallelization and this class are NOT implemented. public: - explicit Stage(std::list devices) : devices_(std::move(devices)), number_(0), rank_(0) { + explicit Stage(std::vector devices) : devices_(std::move(devices)), number_(0), rank_(0) { gm_ = GroupManager(); } - Stage(const std::list& devices, int num, int rank); + Stage(const std::vector& devices, int num, int rank); ~Stage() = default; int GetStageNum() const { return number_; } size_t GetDevicesNum() const { return devices_.size(); } - std::list GetDevicesList() { return devices_; } + std::vector GetDevicesList() { return devices_; } int global_rank(Group* g) const; private: - std::list devices_; + std::vector devices_; int number_; int32_t rank_; GroupManager gm_; @@ -89,10 +89,10 @@ class DeviceManager { RankList global_device_list(int32_t stage_id, int32_t rank, int32_t split_num) const; Device CreateNewDeviceByRank(int32_t rank) const; - std::list CreateDeviceListByRankList(RankList ranks); + std::vector CreateDeviceListByRankList(RankList ranks); std::string GenerateGroupNameByRanks(RankList dev_ranks); - Group CreateGroup(const std::string& group_name, const std::list& devices); + Group CreateGroup(const std::string& group_name, const std::vector& devices); Group CreateGroup(const RankList& dev_ranks); std::shared_ptr GetStageById(int32_t stage_id); @@ -108,11 +108,11 @@ class DeviceManager { std::string FindRankListNameByHashName(const std::string& hash_name); private: - std::list> devices_; + std::vector> devices_; // each stage has a list of devices - std::list> stage_devices_; + std::vector> stage_devices_; std::shared_ptr device_; - std::list> stages_; + std::vector> stages_; GroupManager gm_; std::string backend_; diff --git a/mindspore/ccsrc/parallel/device_matrix.cc b/mindspore/ccsrc/parallel/device_matrix.cc index 5a7aa36c8e6f777325226abf72a8e43d6e265ef9..f9f314d5a3433206cbe08d009c16f0d44c830ad3 100644 --- a/mindspore/ccsrc/parallel/device_matrix.cc +++ b/mindspore/ccsrc/parallel/device_matrix.cc @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "parallel/status.h" #include "parallel/ops_info/operator_info.h" @@ -64,7 +64,7 @@ Status DeviceMatrix::GetDevicesAlongDim(const uint32_t& dim, RankList* devices) } RankList group; - std::list local_group_list; + std::vector local_group_list; // lower than dim int32_t step = 1; @@ -160,7 +160,7 @@ std::string ShapeToString(const Shape& shape) { return str + "]"; } -std::string ListToString(const std::list& list) { +std::string ListToString(const std::vector& list) { std::string str = "["; for (auto& element : list) { str += std::to_string(element) + ", "; diff --git a/mindspore/ccsrc/parallel/device_matrix.h b/mindspore/ccsrc/parallel/device_matrix.h index d3b0fdcb491baa36dd2d828c77fd3bb155032b0d..a91200060417d9b5c6ebf2e1e6ac407095f6e4c3 100644 --- a/mindspore/ccsrc/parallel/device_matrix.h +++ b/mindspore/ccsrc/parallel/device_matrix.h @@ -20,7 +20,6 @@ #include #include #include -#include #include "parallel/status.h" #include "utils/convert_utils.h" @@ -28,7 +27,7 @@ namespace mindspore { namespace parallel { -using RankList = std::list; +using RankList = std::vector; using Shape = std::vector; class DeviceMatrix { @@ -36,7 +35,7 @@ class DeviceMatrix { DeviceMatrix(int32_t rank, RankList devices, Shape dev_shape); DeviceMatrix() = default; ~DeviceMatrix() = default; - std::list group_list() const { return group_list_; } + std::vector group_list() const { return group_list_; } Status CreateGroupList(); Status GetDevicesByTensorMap(const Shape& tensor_map, RankList* rank_list); Status GetDevicesAlongDim(const uint32_t& dim, RankList* devices); @@ -46,11 +45,11 @@ class DeviceMatrix { RankList dev_list_; // From low dim to high dim. eg: [D0 D1 D2 D3] Shape dev_shape_; - std::list group_list_; + std::vector group_list_; }; std::string ShapeToString(const Shape& shape); -std::string ListToString(const std::list& list); +std::string ListToString(const std::vector& list); } // namespace parallel } // namespace mindspore diff --git a/mindspore/ccsrc/parallel/graph_util/generate_graph.cc b/mindspore/ccsrc/parallel/graph_util/generate_graph.cc index d0548ec6475c823154a8f9337486c7847614d0fa..43df9fe8026d617316acd3c603bda0b11f7032f7 100644 --- a/mindspore/ccsrc/parallel/graph_util/generate_graph.cc +++ b/mindspore/ccsrc/parallel/graph_util/generate_graph.cc @@ -17,7 +17,6 @@ #include "parallel/graph_util/generate_graph.h" #include -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/graph_util/generate_graph.h b/mindspore/ccsrc/parallel/graph_util/generate_graph.h index 713c13dfb5eb9c7b48f25b1f682ac7cb5fffc022..bb1f811f2ffa33bd665e44c28258af8e24ba0717 100644 --- a/mindspore/ccsrc/parallel/graph_util/generate_graph.h +++ b/mindspore/ccsrc/parallel/graph_util/generate_graph.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_GRAPH_UTIL_GENERATE_GRAPH_H_ #include -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/group_manager.cc b/mindspore/ccsrc/parallel/group_manager.cc index 35e81a7d83cf01c49dc8904b42568dad04917f2c..cff5877f0a344aa077c011fd8c768dec1df1a48c 100644 --- a/mindspore/ccsrc/parallel/group_manager.cc +++ b/mindspore/ccsrc/parallel/group_manager.cc @@ -30,13 +30,13 @@ Group::Group() { devices_.clear(); } -Status Group::Init(const std::string &name, const std::list &devices) { +Status Group::Init(const std::string &name, const std::vector &devices) { this->name_ = name; this->devices_ = devices; return Status::SUCCESS; } -std::list Group::GetDevicesList() const { return devices_; } +std::vector Group::GetDevicesList() const { return devices_; } bool Group::IsInThisGroup(int32_t device_rank) { for (auto &device : devices_) { @@ -66,7 +66,7 @@ Status Group::GetIndex(size_t *index) { GroupManager::GroupManager() { groups_.clear(); } -Status GroupManager::CreateGroup(const std::string &group_name, const std::list &devices, +Status GroupManager::CreateGroup(const std::string &group_name, const std::vector &devices, mindspore::parallel::Group *const group) { // it is simple to use size to determine whether it is a world group uint32_t world_size = 0; diff --git a/mindspore/ccsrc/parallel/group_manager.h b/mindspore/ccsrc/parallel/group_manager.h index c3b95b99e0ee489114516acbfade25aee6ab7c9a..9e23569b1590e28f05d0ae4618d16a865fa3eb5f 100644 --- a/mindspore/ccsrc/parallel/group_manager.h +++ b/mindspore/ccsrc/parallel/group_manager.h @@ -18,7 +18,7 @@ #define MINDSPORE_CCSRC_PARALLEL_GROUP_MANAGER_H_ #include -#include +#include #include #include @@ -37,8 +37,8 @@ class Group { public: Group(); ~Group() = default; - Status Init(const std::string& name, const std::list& devices); - std::list GetDevicesList() const; + Status Init(const std::string& name, const std::vector& devices); + std::vector GetDevicesList() const; std::string name() const { return name_; } bool IsInThisGroup(int32_t device_rank); Status GetIndex(size_t* index); @@ -46,7 +46,7 @@ class Group { private: std::string name_; - std::list devices_; + std::vector devices_; }; class GroupManager { @@ -54,7 +54,7 @@ class GroupManager { GroupManager(); ~GroupManager() = default; - Status CreateGroup(const std::string& name, const std::list& devices, Group* group); + Status CreateGroup(const std::string& name, const std::vector& devices, Group* group); Status DestroyGroup(Group* group); Status DestroyAllGroups(); Status GetRankID(const std::string& name, unsigned int* rank_id); diff --git a/mindspore/ccsrc/parallel/ops_info/activation_info.h b/mindspore/ccsrc/parallel/ops_info/activation_info.h index e988ccf54c109eb53e80678fdde0af4d0f80a4f3..d8de19b328c57ab36453b4f1a9f3c9b4f666ce84 100644 --- a/mindspore/ccsrc/parallel/ops_info/activation_info.h +++ b/mindspore/ccsrc/parallel/ops_info/activation_info.h @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/ops_info/arithmetic_info.h b/mindspore/ccsrc/parallel/ops_info/arithmetic_info.h index 1b641152aac5ac8f25d6dac30579876b63537ed1..734368a533af667938ececf934df344a8f29410f 100644 --- a/mindspore/ccsrc/parallel/ops_info/arithmetic_info.h +++ b/mindspore/ccsrc/parallel/ops_info/arithmetic_info.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_ARITHMETIC_INFO_H_ #include -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/ops_info/batch_parallel_info.h b/mindspore/ccsrc/parallel/ops_info/batch_parallel_info.h index fb08fbe9fc06accbc726f93f5323bfdeafb39308..0ffdea97f3d827bb728aab92e300ff0953e91ec5 100644 --- a/mindspore/ccsrc/parallel/ops_info/batch_parallel_info.h +++ b/mindspore/ccsrc/parallel/ops_info/batch_parallel_info.h @@ -17,7 +17,6 @@ #ifndef MINDSPORE_CCSRC_PARALLEL_OPS_INFO_BATCH_PARALLEL_INFO_H_ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_BATCH_PARALLEL_INFO_H_ -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/ops_info/bias_add_info.h b/mindspore/ccsrc/parallel/ops_info/bias_add_info.h index ac263ec91f10d7efa9e29d5d69b601783d8967d5..e5001fc0d3c8083f44f46da2e69d06cd1850eb76 100644 --- a/mindspore/ccsrc/parallel/ops_info/bias_add_info.h +++ b/mindspore/ccsrc/parallel/ops_info/bias_add_info.h @@ -18,7 +18,7 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_BIAS_ADD_INFO_H_ #include -#include + #include #include #include diff --git a/mindspore/ccsrc/parallel/ops_info/comparison_function_info.h b/mindspore/ccsrc/parallel/ops_info/comparison_function_info.h index 2762f94eb93399611b7d92224a2e8eaa0bbb0227..8760ce56662d9934cc08a8021c4f5cf45899b776 100644 --- a/mindspore/ccsrc/parallel/ops_info/comparison_function_info.h +++ b/mindspore/ccsrc/parallel/ops_info/comparison_function_info.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_COMPARISON_FUNCTION_INFO_H_ #include -#include #include #include #include "ir/value.h" diff --git a/mindspore/ccsrc/parallel/ops_info/dropout_do_mask_info.h b/mindspore/ccsrc/parallel/ops_info/dropout_do_mask_info.h index 2fc18b521dfe716d904b91b1b6c6dd8201229dab..45d4c28d8e934b606636dbd3656401ee26f1b59e 100644 --- a/mindspore/ccsrc/parallel/ops_info/dropout_do_mask_info.h +++ b/mindspore/ccsrc/parallel/ops_info/dropout_do_mask_info.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_DROPOUT_DO_MASK_INFO_H_ #include -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/ops_info/elementary_function_info.h b/mindspore/ccsrc/parallel/ops_info/elementary_function_info.h index cf85d28fb0c7ea72c10df27c879db93781ccb7e7..33ad04023b44e4a406d0a8b74074f21ff048d354 100644 --- a/mindspore/ccsrc/parallel/ops_info/elementary_function_info.h +++ b/mindspore/ccsrc/parallel/ops_info/elementary_function_info.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_ELEMENTARY_FUNCTION_INFO_H_ #include -#include #include #include #include "ir/value.h" diff --git a/mindspore/ccsrc/parallel/ops_info/generator_info.h b/mindspore/ccsrc/parallel/ops_info/generator_info.h index 0f1d7209c82a37c535aefd875bae5bc47c4a064a..1473fead675f9129f67b5400d401e5efcc1acc4e 100644 --- a/mindspore/ccsrc/parallel/ops_info/generator_info.h +++ b/mindspore/ccsrc/parallel/ops_info/generator_info.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_GENERATOR_INFO_H_ #include -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/ops_info/get_next_info.h b/mindspore/ccsrc/parallel/ops_info/get_next_info.h index 1280d3b19160cf1aeaf8e14f5b8f9cf5de82a5b7..3dd639ba57c75019e9531a3634ebf629a1bf3d40 100644 --- a/mindspore/ccsrc/parallel/ops_info/get_next_info.h +++ b/mindspore/ccsrc/parallel/ops_info/get_next_info.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_GETNEXT_INFO_H_ #include -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/ops_info/l2_normalize_info.h b/mindspore/ccsrc/parallel/ops_info/l2_normalize_info.h index 10bf46d8fffdb0bdeb8b5212d69dda76a66396b1..1a670730650ef5d73c3c1a0e2d44236a0c753b25 100644 --- a/mindspore/ccsrc/parallel/ops_info/l2_normalize_info.h +++ b/mindspore/ccsrc/parallel/ops_info/l2_normalize_info.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_L2_NORMALIZE_INFO_H_ #include -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/ops_info/loss_info.h b/mindspore/ccsrc/parallel/ops_info/loss_info.h index 70de84fda3af9158767e6289abc28117ae1136b2..585545302f9a82177df3a83116c676643a1446d7 100644 --- a/mindspore/ccsrc/parallel/ops_info/loss_info.h +++ b/mindspore/ccsrc/parallel/ops_info/loss_info.h @@ -18,10 +18,10 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_LOSS_INFO_H_ #include -#include #include #include #include + #include "ir/value.h" #include "parallel/ops_info/operator_info.h" #include "parallel/ops_info/activation_info.h" diff --git a/mindspore/ccsrc/parallel/ops_info/matmul_info.cc b/mindspore/ccsrc/parallel/ops_info/matmul_info.cc index 2cd8e0df8f301f3d9008eb33b5d2ded6059698e8..6103087a1d7897f16ab4039e439c7714344e8481 100644 --- a/mindspore/ccsrc/parallel/ops_info/matmul_info.cc +++ b/mindspore/ccsrc/parallel/ops_info/matmul_info.cc @@ -397,7 +397,7 @@ Status MatMulBase::GenerateStrategies(int32_t stage_id) { return FAILED; } CheckGlobalDeviceManager(); - std::list dev_list = g_device_manager->GetDeviceListByStageId(stage_id); + std::vector dev_list = g_device_manager->GetDeviceListByStageId(stage_id); size_t dev_num = dev_list.size(); Shape input0_shape = inputs_shape_[0], input1_shape = inputs_shape_[1]; if (transpose_a_) { diff --git a/mindspore/ccsrc/parallel/ops_info/matmul_info.h b/mindspore/ccsrc/parallel/ops_info/matmul_info.h index daf422e6d659eaa28ea6e5962f7644d65afcb873..c9feae55b6d85fe4397bf68c6cdcec9ff9025584 100644 --- a/mindspore/ccsrc/parallel/ops_info/matmul_info.h +++ b/mindspore/ccsrc/parallel/ops_info/matmul_info.h @@ -18,10 +18,10 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_MATMUL_INFO_H_ #include -#include #include #include #include + #include "ir/value.h" #include "parallel/ops_info/operator_info.h" #include "parallel/strategy.h" diff --git a/mindspore/ccsrc/parallel/ops_info/onehot_info.h b/mindspore/ccsrc/parallel/ops_info/onehot_info.h index fd5d6be8f65155f3a3769f06af28a6edc0e8a3b0..62c66695fa50aa9da524e6e3265abca1f00c7e8e 100644 --- a/mindspore/ccsrc/parallel/ops_info/onehot_info.h +++ b/mindspore/ccsrc/parallel/ops_info/onehot_info.h @@ -18,10 +18,10 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_ONEHOT_INFO_H_ #include -#include #include #include #include + #include "ir/value.h" #include "parallel/ops_info/operator_info.h" #include "parallel/auto_parallel/operator_costmodel.h" diff --git a/mindspore/ccsrc/parallel/ops_info/operator_info.h b/mindspore/ccsrc/parallel/ops_info/operator_info.h index 9902c69ce73217a87dbe43a9d407c6a3d80c9422..89fd73564f9f84c76dc43a62b5258bdcd52ec5f4 100644 --- a/mindspore/ccsrc/parallel/ops_info/operator_info.h +++ b/mindspore/ccsrc/parallel/ops_info/operator_info.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_OPERATOR_INFO_H_ #include -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/ops_info/prelu_info.h b/mindspore/ccsrc/parallel/ops_info/prelu_info.h index d7dac46291990325b5983050e3843606695b8cee..2e74118f80231c3ca6076c7e66a95578bc6daddb 100644 --- a/mindspore/ccsrc/parallel/ops_info/prelu_info.h +++ b/mindspore/ccsrc/parallel/ops_info/prelu_info.h @@ -17,11 +17,11 @@ #ifndef MINDSPORE_CCSRC_PARALLEL_OPS_INFO_PRELU_INFO_H_ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_PRELU_INFO_H_ -#include #include #include #include #include + #include "ir/value.h" #include "parallel/ops_info/operator_info.h" #include "parallel/strategy.h" diff --git a/mindspore/ccsrc/parallel/ops_info/reduce_method_info.cc b/mindspore/ccsrc/parallel/ops_info/reduce_method_info.cc index 216357d5abc1cabcbf26429019d611f599fcd994..5f9a67c22df6b6837e47dcb276b99990ec1d6218 100644 --- a/mindspore/ccsrc/parallel/ops_info/reduce_method_info.cc +++ b/mindspore/ccsrc/parallel/ops_info/reduce_method_info.cc @@ -198,7 +198,7 @@ ForwardOp CreatReduceMeanForwardOp(const std::vector &forward_group, cons // Creat RealDiv op OperatorName operator1_name = REAL_DIV; - std::list device_list = forward_group[0].GetDevicesList(); + std::vector device_list = forward_group[0].GetDevicesList(); auto divisor = static_cast(device_list.size()); py::tuple tuple = py::make_tuple(divisor); mindspore::tensor::TensorPtr tensor_ptr = std::make_shared(tuple, dtype); diff --git a/mindspore/ccsrc/parallel/ops_info/reduce_method_info.h b/mindspore/ccsrc/parallel/ops_info/reduce_method_info.h index e9f03bcdeeb19e9beeb9d26f162aa940c6db6662..6f26b99ffb7873c1feab1035e466872db0eb82d8 100644 --- a/mindspore/ccsrc/parallel/ops_info/reduce_method_info.h +++ b/mindspore/ccsrc/parallel/ops_info/reduce_method_info.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_REDUCE_SUM_INFO_H_ #include -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/ops_info/reshape_info.h b/mindspore/ccsrc/parallel/ops_info/reshape_info.h index a8a93235406a3b6a8ebb6c32d2a72b123d64f3ca..982894a8e0bac0c8f14ba2541be7777101ae6ec5 100644 --- a/mindspore/ccsrc/parallel/ops_info/reshape_info.h +++ b/mindspore/ccsrc/parallel/ops_info/reshape_info.h @@ -19,7 +19,6 @@ #include -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/ops_info/tmp_identity_info.h b/mindspore/ccsrc/parallel/ops_info/tmp_identity_info.h index 1ef7341f3b358533fca911423adb5dba40b18b36..304e336adfb9857f8014395d20e084555717bdb4 100644 --- a/mindspore/ccsrc/parallel/ops_info/tmp_identity_info.h +++ b/mindspore/ccsrc/parallel/ops_info/tmp_identity_info.h @@ -20,6 +20,7 @@ #include #include #include + #include "parallel/ops_info/operator_info.h" #include "parallel/auto_parallel/operator_costmodel.h" #include "parallel/strategy.h" diff --git a/mindspore/ccsrc/parallel/ops_info/transpose_info.h b/mindspore/ccsrc/parallel/ops_info/transpose_info.h index 6c5e98e3b9b47e54ef4d4e3dfb141cb66783213b..c7c1c966750ac22cdfd8fb18f4469d3371479be1 100644 --- a/mindspore/ccsrc/parallel/ops_info/transpose_info.h +++ b/mindspore/ccsrc/parallel/ops_info/transpose_info.h @@ -17,11 +17,11 @@ #ifndef MINDSPORE_CCSRC_PARALLEL_OPS_INFO_TRANSPOSE_INFO_H_ #define MINDSPORE_CCSRC_PARALLEL_OPS_INFO_TRANSPOSE_INFO_H_ -#include #include #include #include #include + #include "ir/value.h" #include "parallel/ops_info/operator_info.h" #include "parallel/strategy.h" diff --git a/mindspore/ccsrc/parallel/ops_info/virtual_dataset_info.h b/mindspore/ccsrc/parallel/ops_info/virtual_dataset_info.h index d22565d30543efc3ffd4e185229b0e41fe75b787..c4fdfcef049102db8dcb176ee0c28c2ff78393ed 100644 --- a/mindspore/ccsrc/parallel/ops_info/virtual_dataset_info.h +++ b/mindspore/ccsrc/parallel/ops_info/virtual_dataset_info.h @@ -17,11 +17,11 @@ #ifndef PARALLEL_OPS_INFO_DATASET_INFO_H_ #define PARALLEL_OPS_INFO_DATASET_INFO_H_ -#include #include #include #include #include + #include "ir/value.h" #include "parallel/ops_info/operator_info.h" #include "parallel/strategy.h" diff --git a/mindspore/ccsrc/parallel/status.h b/mindspore/ccsrc/parallel/status.h index 4c018c7c175240329a6c59e0ccf7c79708cd3b31..9d773f0d9b419fc5685758c3e16f5ab51f116ebe 100644 --- a/mindspore/ccsrc/parallel/status.h +++ b/mindspore/ccsrc/parallel/status.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_STATUS_H_ #include -#include namespace mindspore { namespace parallel { diff --git a/mindspore/ccsrc/parallel/step_parallel.cc b/mindspore/ccsrc/parallel/step_parallel.cc index 21da11ec219d678bb7c2a92a95acd370fa63013c..d8c2864dbf55f7dbc922c3ec82131b4357a9030c 100644 --- a/mindspore/ccsrc/parallel/step_parallel.cc +++ b/mindspore/ccsrc/parallel/step_parallel.cc @@ -19,7 +19,7 @@ #include #include #include -#include + #include #include #include diff --git a/mindspore/ccsrc/parallel/step_parallel.h b/mindspore/ccsrc/parallel/step_parallel.h index ac7376a09d0d201e7bfc2a0765973cca749b7c27..2d1982dc9c13ae99ddbca4375a061fcf564174bb 100644 --- a/mindspore/ccsrc/parallel/step_parallel.h +++ b/mindspore/ccsrc/parallel/step_parallel.h @@ -18,7 +18,7 @@ #define MINDSPORE_CCSRC_PARALLEL_STEP_PARALLEL_H_ #include -#include + #include #include #include diff --git a/mindspore/ccsrc/parallel/strategy.h b/mindspore/ccsrc/parallel/strategy.h index 24879c12c1bab11ced0faf23472d454e7b136334..68ba4962d7cc731d169403b5f69876e40146816b 100644 --- a/mindspore/ccsrc/parallel/strategy.h +++ b/mindspore/ccsrc/parallel/strategy.h @@ -18,7 +18,6 @@ #define MINDSPORE_CCSRC_PARALLEL_STRATEGY_H_ #include -#include #include #include #include diff --git a/mindspore/ccsrc/parallel/tensor_layout/redistribution_operator_infer.h b/mindspore/ccsrc/parallel/tensor_layout/redistribution_operator_infer.h index 77955b5d1a25a805388628a357695d062291d05d..3515c7383a6248ca34bbd883ede7f60dc177e25e 100644 --- a/mindspore/ccsrc/parallel/tensor_layout/redistribution_operator_infer.h +++ b/mindspore/ccsrc/parallel/tensor_layout/redistribution_operator_infer.h @@ -22,7 +22,6 @@ #include #include #include -#include #include "parallel/tensor_layout/redistribution_layout_transfer.h" #include "parallel/tensor_layout/construct_operator.h" diff --git a/tests/ut/cpp/parallel/auto_parallel/dp_algo_test.cc b/tests/ut/cpp/parallel/auto_parallel/dp_algo_test.cc index 73eff993045c30a50a91b9cb5aace72258ecf84d..d0243d5327be833b96e6cae303c6bf796b558a99 100644 --- a/tests/ut/cpp/parallel/auto_parallel/dp_algo_test.cc +++ b/tests/ut/cpp/parallel/auto_parallel/dp_algo_test.cc @@ -154,13 +154,13 @@ class TestDPAlgo : public UT::Common { void TestDPAlgo::SetUp() { cost_graph = std::make_shared(); cost_graph->SetDeviceMemoryAndCostParameter(); - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 10; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(8); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/auto_parallel/edge_costmodel_test.cc b/tests/ut/cpp/parallel/auto_parallel/edge_costmodel_test.cc index adf06d8fcc67739e0448d11665ff1cf1e958484f..467f4976e83bef8f77dff5e4e30e3b7d01a03a49 100644 --- a/tests/ut/cpp/parallel/auto_parallel/edge_costmodel_test.cc +++ b/tests/ut/cpp/parallel/auto_parallel/edge_costmodel_test.cc @@ -42,13 +42,13 @@ class TestEdgeCostModel : public UT::Common { }; void TestEdgeCostModel::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 10; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(8); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/auto_parallel/graph_costmodel_test.cc b/tests/ut/cpp/parallel/auto_parallel/graph_costmodel_test.cc index 14281934813f3f249fae647baed6ebad5fd74ad5..83a9eceaccbd83386e16bf59a8ec7cc7efcd5e13 100644 --- a/tests/ut/cpp/parallel/auto_parallel/graph_costmodel_test.cc +++ b/tests/ut/cpp/parallel/auto_parallel/graph_costmodel_test.cc @@ -53,13 +53,13 @@ class TestCostGraph : public UT::Common { void TestCostGraph::SetUp() { cost_graph.SetDeviceMemoryAndCostParameter(); - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 10; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(8); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/auto_parallel/operator_costmodel_test.cc b/tests/ut/cpp/parallel/auto_parallel/operator_costmodel_test.cc index 3b71c80c4b43d492a46b9df59de1a1fba8f7d183..3bd65c049c546abaff1260e8df216e38b92d5725 100644 --- a/tests/ut/cpp/parallel/auto_parallel/operator_costmodel_test.cc +++ b/tests/ut/cpp/parallel/auto_parallel/operator_costmodel_test.cc @@ -33,13 +33,13 @@ class TestMatMulCost : public UT::Common { void TestMatMulCost::SetUp() { mmcost_ = MatMulCost(); - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 1050; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(1024); stage_map.push_back(26); @@ -90,13 +90,13 @@ class TestActivationCost : public UT::Common { void TestActivationCost::SetUp() { ac_cost_ = ActivationCost(); - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 1050; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(1024); stage_map.push_back(26); @@ -142,13 +142,13 @@ class TestPReLUCost : public UT::Common { void TestPReLUCost::SetUp() { prelu_cost_ = PReLUCost(); - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 1050; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(1024); stage_map.push_back(26); diff --git a/tests/ut/cpp/parallel/device_manager_test.cc b/tests/ut/cpp/parallel/device_manager_test.cc index 0814ca64d064e8bc75772a0fc5198f0620e29933..056896f5144de95c17f5a649997932723a7048fe 100644 --- a/tests/ut/cpp/parallel/device_manager_test.cc +++ b/tests/ut/cpp/parallel/device_manager_test.cc @@ -69,8 +69,8 @@ void TestDeviceManager::TearDown() { } TEST_F(TestDeviceManager, test_dm_init_AND_get_device_list) { - std::list dev_list; - std::list stage_map; + std::vector dev_list; + std::vector stage_map; int32_t local_dev = 0; dev_list.push_back(5); @@ -85,12 +85,12 @@ TEST_F(TestDeviceManager, test_dm_init_AND_get_device_list) { ASSERT_EQ(dm_.DeviceNum(), 4); ASSERT_EQ(dm_.GetStageNum(), (int32_t)(2)); - std::list dev_list_0 = dm_.GetDeviceListByStageId(0); - std::list dev_list_1 = dm_.GetDeviceListByStageId(1); + std::vector dev_list_0 = dm_.GetDeviceListByStageId(0); + std::vector dev_list_1 = dm_.GetDeviceListByStageId(1); ASSERT_EQ(dev_list_0.size(), 2); ASSERT_EQ(dev_list_1.size(), 2); - std::list::iterator it = dev_list_0.begin(); + std::vector::iterator it = dev_list_0.begin(); ASSERT_EQ((*it), int32_t(5)); it++; ASSERT_EQ((*it), int32_t(3)); @@ -111,13 +111,13 @@ TEST_F(TestDeviceManager, test_CreateNewDeviceByRank) { } TEST_F(TestDeviceManager, test_CreateDeviceListByRankList) { - std::list dev_list; - std::list rlist; + std::vector dev_list; + std::vector rlist; rlist.push_back(int32_t(2)); rlist.push_back(int32_t(1)); dev_list = dm_.CreateDeviceListByRankList(rlist); - std::list::iterator it = dev_list.begin(); + std::vector::iterator it = dev_list.begin(); ASSERT_EQ(it->rank(), int32_t(2)); it++; ASSERT_EQ(it->rank(), int32_t(1)); diff --git a/tests/ut/cpp/parallel/device_matrix_test.cc b/tests/ut/cpp/parallel/device_matrix_test.cc index 9c3fa9a86140aac9d6eb48214ab3c7b091c8a94c..877a211df8cbfd470ccd61f3777b9e541db86cda 100644 --- a/tests/ut/cpp/parallel/device_matrix_test.cc +++ b/tests/ut/cpp/parallel/device_matrix_test.cc @@ -35,9 +35,9 @@ TEST_F(TestDeviceMatrix, Test2Dgroup_list) { Shape shape = {2, 3}; DeviceMatrix arr(0, dev_list, shape); - std::list group_list; + std::vector group_list; if (arr.CreateGroupList() == Status::SUCCESS) group_list = arr.group_list(); - std::list group_list_expect = {{0, 3}, {0, 1, 2}}; + std::vector group_list_expect = {{0, 3}, {0, 1, 2}}; ASSERT_EQ(group_list, group_list_expect); } @@ -46,9 +46,9 @@ TEST_F(TestDeviceMatrix, Test3Dgroup_list) { Shape shape = {2, 2, 3}; DeviceMatrix arr(5, dev_list, shape); - std::list group_list; + std::vector group_list; if (arr.CreateGroupList() == Status::SUCCESS) group_list = arr.group_list(); - std::list group_list_expect = {{5, 11}, {2, 5}, {3, 4, 5}}; + std::vector group_list_expect = {{5, 11}, {2, 5}, {3, 4, 5}}; ASSERT_EQ(group_list, group_list_expect); } @@ -57,9 +57,9 @@ TEST_F(TestDeviceMatrix, Test4DGetAlongDim) { Shape shape = {2, 1, 4, 2}; DeviceMatrix arr(5, dev_list, shape); - std::list group_list; + std::vector group_list; if (arr.CreateGroupList() == Status::SUCCESS) group_list = arr.group_list(); - std::list group_list_expect = {{5, 13}, {5}, {1, 3, 5, 7}, {4, 5}}; + std::vector group_list_expect = {{5, 13}, {5}, {1, 3, 5, 7}, {4, 5}}; ASSERT_EQ(group_list, group_list_expect); } @@ -69,9 +69,9 @@ TEST_F(TestDeviceMatrix, Test5DGetAlongDim) { Shape shape = {3, 4, 2, 3, 2}; DeviceMatrix arr(5, dev_list, shape); - std::list group_list; + std::vector group_list; if (arr.CreateGroupList() == Status::SUCCESS) group_list = arr.group_list(); - std::list group_list_expect = {{5, 53, 101}, {5, 17, 29, 41}, {5, 11}, {1, 3, 5}, {4, 5}}; + std::vector group_list_expect = {{5, 53, 101}, {5, 17, 29, 41}, {5, 11}, {1, 3, 5}, {4, 5}}; ASSERT_EQ(group_list, group_list_expect); } diff --git a/tests/ut/cpp/parallel/group_manager_test.cc b/tests/ut/cpp/parallel/group_manager_test.cc index 1e9ec9c0608d1a2fe070004b37ef858f638f3285..e3d2b3a364c42611cbc50c1f29c4cff1b9e5acae 100644 --- a/tests/ut/cpp/parallel/group_manager_test.cc +++ b/tests/ut/cpp/parallel/group_manager_test.cc @@ -42,7 +42,7 @@ void TestGroup::TearDown() { Status TestGroup::Init() { std::string gname = "1-2"; - std::list dev_list; + std::vector dev_list; Device one = Device(int32_t(1)); dev_list.push_back(one); Device two = Device(int32_t(2)); @@ -55,8 +55,8 @@ TEST_F(TestGroup, test_Init) { ASSERT_EQ(Init(), Status::SUCCESS); } TEST_F(TestGroup, test_GetDevicesList) { Init(); - std::list res_dev_list = gp.GetDevicesList(); - std::list::iterator it = res_dev_list.begin(); + std::vector res_dev_list = gp.GetDevicesList(); + std::vector::iterator it = res_dev_list.begin(); ASSERT_EQ(it->rank(), int32_t(1)); it++; ASSERT_EQ(it->rank(), int32_t(2)); @@ -88,7 +88,7 @@ void TestGroupManager::TearDown() { Status TestGroupManager::Init(Group** gp_ptr) { std::string gname = "1-2"; - std::list dev_list; + std::vector dev_list; Device one = Device(int32_t(1)); dev_list.push_back(one); Device two = Device(int32_t(2)); @@ -102,15 +102,15 @@ TEST_F(TestGroupManager, test_CreateGroup) { Group* gp_ptr = new Group(); ASSERT_EQ(Init(&gp_ptr), Status::SUCCESS); - std::list res_dev_list = gp_ptr->GetDevicesList(); - std::list::iterator it = res_dev_list.begin(); + std::vector res_dev_list = gp_ptr->GetDevicesList(); + std::vector::iterator it = res_dev_list.begin(); ASSERT_EQ(it->rank(), int32_t(1)); it++; ASSERT_EQ(it->rank(), int32_t(2)); delete gp_ptr; // testing for creating a group with an existing group name - std::list dev_list2; + std::vector dev_list2; Device three = Device(int32_t(3)); dev_list2.push_back(three); Device four = Device(int32_t(4)); @@ -119,8 +119,8 @@ TEST_F(TestGroupManager, test_CreateGroup) { ASSERT_EQ(gm.CreateGroup("1-2", dev_list2, gp_ptr), Status::SUCCESS); ASSERT_STREQ(gp_ptr->name().data(), "1-2"); - std::list res_dev_list2 = gp_ptr->GetDevicesList(); - std::list::iterator it2 = res_dev_list2.begin(); + std::vector res_dev_list2 = gp_ptr->GetDevicesList(); + std::vector::iterator it2 = res_dev_list2.begin(); ASSERT_EQ(it2->rank(), int32_t(1)); it2++; ASSERT_EQ(it2->rank(), int32_t(2)); @@ -136,8 +136,8 @@ TEST_F(TestGroupManager, test_FindGroup) { ASSERT_EQ(gm.FindGroup(gname, &gp_ptr2), Status::SUCCESS); - std::list res_dev_list = gp_ptr2->GetDevicesList(); - std::list::iterator it = res_dev_list.begin(); + std::vector res_dev_list = gp_ptr2->GetDevicesList(); + std::vector::iterator it = res_dev_list.begin(); ASSERT_EQ(it->rank(), int32_t(1)); it++; ASSERT_EQ(it->rank(), int32_t(2)); diff --git a/tests/ut/cpp/parallel/ops_info/activation_info_test.cc b/tests/ut/cpp/parallel/ops_info/activation_info_test.cc index a725cb0bf78aefd59d6bb0fafb05e68f72ec7792..a9fe9b4c4894bdce283eaef570df96a0ebdfb653 100644 --- a/tests/ut/cpp/parallel/ops_info/activation_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/activation_info_test.cc @@ -38,13 +38,13 @@ class TestActivationInfo : public UT::Common { }; void TestActivationInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 1050; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(1024); stage_map.push_back(26); diff --git a/tests/ut/cpp/parallel/ops_info/activation_test.cc b/tests/ut/cpp/parallel/ops_info/activation_test.cc index 200b96eb2e568f3a3bd03cae507cbad45761519a..149aa9d5af7e95d17f74b5b03b80d3ec19c8a9e3 100644 --- a/tests/ut/cpp/parallel/ops_info/activation_test.cc +++ b/tests/ut/cpp/parallel/ops_info/activation_test.cc @@ -40,13 +40,13 @@ class TestActivation : public UT::Common { }; void TestActivation::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 1050; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(1024); stage_map.push_back(26); diff --git a/tests/ut/cpp/parallel/ops_info/dropout_do_mask_info_test.cc b/tests/ut/cpp/parallel/ops_info/dropout_do_mask_info_test.cc index 5ae79e2851e064fb76b95e1297371d524ca86aba..2f17fb4450efcfd6f23f69a8196499f4c890b6c6 100644 --- a/tests/ut/cpp/parallel/ops_info/dropout_do_mask_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/dropout_do_mask_info_test.cc @@ -38,13 +38,13 @@ class TestDropoutDoMaskInfo : public UT::Common { }; void TestDropoutDoMaskInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 34; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(32); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/gelu_info_test.cc b/tests/ut/cpp/parallel/ops_info/gelu_info_test.cc index d07794f63d6ad9e20287ae8965e33e0c932ee186..e54d1f24235ec9d43c7f9a0fbbdcb3a4425638c7 100644 --- a/tests/ut/cpp/parallel/ops_info/gelu_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/gelu_info_test.cc @@ -38,13 +38,13 @@ class TestGeluInfo : public UT::Common { }; void TestGeluInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 130; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(128); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/generate_strategy_test.cc b/tests/ut/cpp/parallel/ops_info/generate_strategy_test.cc index 81b1d3a1ec8d0e40e6efa8b1d1eecefe89ed453c..947ad60ccad908bd5c7448cc00d25419a67c792d 100644 --- a/tests/ut/cpp/parallel/ops_info/generate_strategy_test.cc +++ b/tests/ut/cpp/parallel/ops_info/generate_strategy_test.cc @@ -34,13 +34,13 @@ class TestGenerateStrategy : public UT::Common { }; void TestGenerateStrategy::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 10; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(8); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/generator_info_test.cc b/tests/ut/cpp/parallel/ops_info/generator_info_test.cc index bfd14ced30debc28964c4b84f657dfe01c7b7aeb..eb463066a67663088846ac827e7e13934f809e5c 100644 --- a/tests/ut/cpp/parallel/ops_info/generator_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/generator_info_test.cc @@ -38,13 +38,13 @@ class TestDropoutGenMaskInfo : public UT::Common { }; void TestDropoutGenMaskInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 10; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(8); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/get_next_info_test.cc b/tests/ut/cpp/parallel/ops_info/get_next_info_test.cc index 1276a3022577e0182871d5c62c4079fb9b95e0e8..503edf2edadaf3eefe7693c034d205086eb78520 100644 --- a/tests/ut/cpp/parallel/ops_info/get_next_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/get_next_info_test.cc @@ -38,13 +38,13 @@ class TestGetNextInfo : public UT::Common { }; void TestGetNextInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 8; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(8); int32_t local_dev = 0; // create a new g_device_manager diff --git a/tests/ut/cpp/parallel/ops_info/l2_normalize_info_test.cc b/tests/ut/cpp/parallel/ops_info/l2_normalize_info_test.cc index 07a160ec993e967d3c38c472923024f269bd75d9..b59481e1f60ea0d4a8b23f64bfcfa3845680b3bb 100644 --- a/tests/ut/cpp/parallel/ops_info/l2_normalize_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/l2_normalize_info_test.cc @@ -38,13 +38,13 @@ class TestL2NormalizeInfo : public UT::Common { }; void TestL2NormalizeInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 34; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(32); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/log_softmax_info_test.cc b/tests/ut/cpp/parallel/ops_info/log_softmax_info_test.cc index 1c31463c885af6e94867cae581ea009dbdf72a46..cf5a4239a232ce1d8beb2db241d2701878e09735 100644 --- a/tests/ut/cpp/parallel/ops_info/log_softmax_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/log_softmax_info_test.cc @@ -38,13 +38,13 @@ class TestLogSoftmaxInfo : public UT::Common { }; void TestLogSoftmaxInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 130; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(128); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/matmul_info_test.cc b/tests/ut/cpp/parallel/ops_info/matmul_info_test.cc index 02f448874439e3212aec1c7f059bf230dffe8b5a..978b792a0c3d282af51f1a5eadfb6231962fad26 100644 --- a/tests/ut/cpp/parallel/ops_info/matmul_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/matmul_info_test.cc @@ -42,13 +42,13 @@ class TestMatmulInfo : public UT::Common { }; void TestMatmulInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 1050; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(1024); stage_map.push_back(26); diff --git a/tests/ut/cpp/parallel/ops_info/onehot_info_test.cc b/tests/ut/cpp/parallel/ops_info/onehot_info_test.cc index df67175ae6d24df985c1bebc4aecbbd19b58553c..07d150a29448babeaa2dbc78a71e8d972299ea85 100644 --- a/tests/ut/cpp/parallel/ops_info/onehot_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/onehot_info_test.cc @@ -38,13 +38,13 @@ class TestOneHotInfo : public UT::Common { }; void TestOneHotInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 10; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(8); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/onehot_info_test_axis_0.cc b/tests/ut/cpp/parallel/ops_info/onehot_info_test_axis_0.cc index 17fe36517634ae45c231ad41ff1b8664edeb7c66..c89bf97fb3568e12f0d48e1a42e2da84cb9925c7 100644 --- a/tests/ut/cpp/parallel/ops_info/onehot_info_test_axis_0.cc +++ b/tests/ut/cpp/parallel/ops_info/onehot_info_test_axis_0.cc @@ -38,13 +38,13 @@ class TestOneHotInfo2 : public UT::Common { }; void TestOneHotInfo2::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 10; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(8); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/pow_info_test.cc b/tests/ut/cpp/parallel/ops_info/pow_info_test.cc index 86d62190a7f5cfb4ad0f9c4d7b58281cedace61d..f6ea2c3d3c3be470fbafc7f5c07d595c0b567d46 100644 --- a/tests/ut/cpp/parallel/ops_info/pow_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/pow_info_test.cc @@ -38,13 +38,13 @@ class TestPowInfo : public UT::Common { }; void TestPowInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 66; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(64); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/prelu_test.cc b/tests/ut/cpp/parallel/ops_info/prelu_test.cc index bb815921e0acefa6354b37e3166dea5b1f227f2b..5ff261234fee0f0694d61ddbc1b1eddb6ca3a5c2 100644 --- a/tests/ut/cpp/parallel/ops_info/prelu_test.cc +++ b/tests/ut/cpp/parallel/ops_info/prelu_test.cc @@ -39,13 +39,13 @@ class TestPReLUInfo : public UT::Common { }; void TestPReLUInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 1050; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(1024); stage_map.push_back(26); int32_t local_dev = 0; diff --git a/tests/ut/cpp/parallel/ops_info/reduce_method_test.cc b/tests/ut/cpp/parallel/ops_info/reduce_method_test.cc index 0ce81b0cd081054582e4050bc930500c2bcd9c06..a1fe46ca3328dc1af6052e178f9cd6df76967183 100644 --- a/tests/ut/cpp/parallel/ops_info/reduce_method_test.cc +++ b/tests/ut/cpp/parallel/ops_info/reduce_method_test.cc @@ -39,13 +39,13 @@ class TestReduceSumInfo : public UT::Common { void TestReduceSumInfo::SetUp() { UT::InitPythonPath(); - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 34; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(32); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/reshape_test.cc b/tests/ut/cpp/parallel/ops_info/reshape_test.cc index 73a0d68be51804d9eedac7d034fe64de0ce85781..7ff94e9af5b1807e47258886b08ba7aab9ed442a 100644 --- a/tests/ut/cpp/parallel/ops_info/reshape_test.cc +++ b/tests/ut/cpp/parallel/ops_info/reshape_test.cc @@ -38,13 +38,13 @@ class TestReshapeInfo : public UT::Common { }; void TestReshapeInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 34; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(32); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/softmax_entropy_loss_info_test.cc b/tests/ut/cpp/parallel/ops_info/softmax_entropy_loss_info_test.cc index cba9b7ecd6b58558e5b307fbd86aa82c19f1596b..03634b9a6fc8dd291359e837a8080c95cf5c0dd2 100644 --- a/tests/ut/cpp/parallel/ops_info/softmax_entropy_loss_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/softmax_entropy_loss_info_test.cc @@ -38,13 +38,13 @@ class TestSoftmaxLoss : public UT::Common { }; void TestSoftmaxLoss::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 65; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(64); stage_map.push_back(1); diff --git a/tests/ut/cpp/parallel/ops_info/softmax_info_test.cc b/tests/ut/cpp/parallel/ops_info/softmax_info_test.cc index 65fd46fb9ce028c99f6b093895965915167e5589..bba6e89626eca7cc4c6de36163ec3c6f9e9c385f 100644 --- a/tests/ut/cpp/parallel/ops_info/softmax_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/softmax_info_test.cc @@ -39,13 +39,13 @@ class TestSoftmaxInfo : public UT::Common { }; void TestSoftmaxInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 130; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(128); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/tanh_info_test.cc b/tests/ut/cpp/parallel/ops_info/tanh_info_test.cc index 3ee99d093fc31661b2aa57f140f51ede0fbf581a..a892c5c84a9dae782c161132182065fa4f7ab970 100644 --- a/tests/ut/cpp/parallel/ops_info/tanh_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/tanh_info_test.cc @@ -38,13 +38,13 @@ class TestTanhInfo : public UT::Common { }; void TestTanhInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 130; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(128); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/tensor_add_info_test.cc b/tests/ut/cpp/parallel/ops_info/tensor_add_info_test.cc index 612b344514d6ec70c526c391e0fb2a6f22745bbf..e7736a4b3ef9e05839652e71ccad3ce8e3e2404f 100644 --- a/tests/ut/cpp/parallel/ops_info/tensor_add_info_test.cc +++ b/tests/ut/cpp/parallel/ops_info/tensor_add_info_test.cc @@ -38,13 +38,13 @@ class TestTensorAddInfo : public UT::Common { }; void TestTensorAddInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 34; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(32); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/ops_info/tmpidentity_test.cc b/tests/ut/cpp/parallel/ops_info/tmpidentity_test.cc index 7edeb5a553fa221c82dfcf96d648b4e28a74c8f3..ce1238baeba6f7dda2d56d2b7e10c0fcf34c4241 100644 --- a/tests/ut/cpp/parallel/ops_info/tmpidentity_test.cc +++ b/tests/ut/cpp/parallel/ops_info/tmpidentity_test.cc @@ -38,13 +38,13 @@ class TestTmpIdentityInfo : public UT::Common { }; void TestTmpIdentityInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 1050; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(1024); stage_map.push_back(26); diff --git a/tests/ut/cpp/parallel/ops_info/transpose_test.cc b/tests/ut/cpp/parallel/ops_info/transpose_test.cc index d54258915d77fcf722b190da6e1d302bfc224ba6..991ec478205912726858597d43c82df8e4c6192a 100644 --- a/tests/ut/cpp/parallel/ops_info/transpose_test.cc +++ b/tests/ut/cpp/parallel/ops_info/transpose_test.cc @@ -38,13 +38,13 @@ class TestTransposeInfo : public UT::Common { }; void TestTransposeInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 34; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(32); stage_map.push_back(2); diff --git a/tests/ut/cpp/parallel/step_auto_parallel_test.cc b/tests/ut/cpp/parallel/step_auto_parallel_test.cc index 5503377ee2957089113c16e4d96f07b217c85f81..a1474ca2447e595c7ccaee8db41d6f5880a47d4a 100644 --- a/tests/ut/cpp/parallel/step_auto_parallel_test.cc +++ b/tests/ut/cpp/parallel/step_auto_parallel_test.cc @@ -32,13 +32,13 @@ class TestStepAutoParallel : public UT::Common { }; void TestStepAutoParallel::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 20; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(16); stage_map.push_back(4); diff --git a/tests/ut/cpp/parallel/step_parallel_test.cc b/tests/ut/cpp/parallel/step_parallel_test.cc index 23debf11ac22e6107434d68845e86726800c5bcf..afc898907bd6f894ee2f2e81380670e4c0a6eccf 100644 --- a/tests/ut/cpp/parallel/step_parallel_test.cc +++ b/tests/ut/cpp/parallel/step_parallel_test.cc @@ -34,13 +34,13 @@ class TestStepParallel : public UT::Common { void TestStepParallel::SetUp() { UT::InitPythonPath(); } void Init_Device_Manager() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 20; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(16); stage_map.push_back(4); diff --git a/tests/ut/cpp/parallel/tensor_layout/construct_operator_test.cc b/tests/ut/cpp/parallel/tensor_layout/construct_operator_test.cc index bebe55250b0572703910fbcc6cc22ad8998e0b62..2ba8cc9dfc1d0c2aa634bf43d6cf787edd6636db 100644 --- a/tests/ut/cpp/parallel/tensor_layout/construct_operator_test.cc +++ b/tests/ut/cpp/parallel/tensor_layout/construct_operator_test.cc @@ -39,12 +39,12 @@ class TestConstructOperator : public UT::Common { }; void TestConstructOperator::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 1050; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(1024); stage_map.push_back(26); diff --git a/tests/ut/cpp/parallel/tensor_layout/redistribution_operator_infer_test.cc b/tests/ut/cpp/parallel/tensor_layout/redistribution_operator_infer_test.cc index 5ffd9b22ce9d463f09ef85c308c9d174c81345b1..1b1dd4af043953867aa930a864c86a23c2357c38 100644 --- a/tests/ut/cpp/parallel/tensor_layout/redistribution_operator_infer_test.cc +++ b/tests/ut/cpp/parallel/tensor_layout/redistribution_operator_infer_test.cc @@ -28,13 +28,13 @@ class TestRedistributionOperatorInfer : public UT::Common { TestRedistributionOperatorInfer() {} void SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 1050; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(1024); stage_map.push_back(26); diff --git a/tests/ut/cpp/parallel/tensor_layout/tensor_redistribution_test.cc b/tests/ut/cpp/parallel/tensor_layout/tensor_redistribution_test.cc index ad20793417f5d5d16d47d0a9878e97b9bc084060..572763faa380908400738bb8aa23e4ea16707b48 100644 --- a/tests/ut/cpp/parallel/tensor_layout/tensor_redistribution_test.cc +++ b/tests/ut/cpp/parallel/tensor_layout/tensor_redistribution_test.cc @@ -33,7 +33,7 @@ class TestTensorRedistribution : public UT::Common { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(16); stage_map.push_back(4); diff --git a/tests/ut/cpp/parallel/virtual_dataset_test.cc b/tests/ut/cpp/parallel/virtual_dataset_test.cc index 602a7370f185fdba7e02375827862d1056ce87b6..1d3ff081c7ccb83701c5a3a1c6d8492630ae8b70 100644 --- a/tests/ut/cpp/parallel/virtual_dataset_test.cc +++ b/tests/ut/cpp/parallel/virtual_dataset_test.cc @@ -37,13 +37,13 @@ class TestVirtualDatasetInfo : public UT::Common { }; void TestVirtualDatasetInfo::SetUp() { - std::list dev_list; + std::vector dev_list; for (int32_t i = 0; i < 130; i++) { dev_list.push_back(i); } - std::list stage_map; + std::vector stage_map; stage_map.push_back(16); stage_map.push_back(114);