Commit Graph

14 Commits

Author SHA1 Message Date
i-robot dfd71f668b !26556 modify parallel api note for master
Merge pull request !26556 from lilei/modify_parallel_API_note
2021-11-25 03:02:55 +00:00
lilei f8827a09fb modify parallel API note for master 2021-11-24 17:44:35 +08:00
He Wei 41dcac9c49 Replace std::unordered_map/set with robin-hood-hashing
Robin-hood-hashing (https://github.com/martinus/robin-hood-hashing)
is considered faster then std::unordered_map/set,
so we use it to improve mindspore performance.

1. robin_hood head file in `third_party/robin_hood/include`;
2. In `utils/hash_map.h` and `utils/hash_set.h`, we define:
 - mindspore::HashMap as an alias of robin_hood::unordered_map;
 - mindspore::HashSet as an alias of robin_hood::unordered_set;
3. Replace:
 - `#include <unordered_map>` --> `#include "utils/hash_map.h"`;
 - `#include <unordered_set>` --> `#include "utils/hash_set.h"`;
 - `std::unordered_map` --> `mindspore::HashMap`;
 - `std::unordered_set` --> `mindspore::HashSet`;
 - `map.insert(std::pair(key, value))` --> `map.emplace(key, value)`;
 - `[] (const std::pair<K, V> &p) {..} ` --> `[] (const auto &p) {..} `;
4. Fix issues found by switch to robin_hood:
 - AnfNodeConfig hash and equal;
 - Fix a bug in `Slice::operator==()`;
 - Fix a bug in `CNode::HasPrimalAttr()`;
 - Fix map.erase() usage bugs: `map.erase(iter++)` --> `iter = map.erase(iter)`;
 - Fix some iterator invalidated problem;
5. Some std::unordered_map/set can not replace by robin_hood:
 - As parameter of functions that exposed to python by pybind11;
 - Use bad hash that cause robin_hood::map over_flow, such as AbstractBasePtrListHasher;
6. Update cpp unit tests;
7. Add build option '-F' to enable robin_hood, default on.
2021-11-24 10:47:40 +08:00
yao_yf 01dc4bbdf9 fix fault recover in optimizer shard 2021-11-19 09:46:27 +08:00
yao_yf 501b978d16 find data parallel common group in auto parallel 2021-11-13 10:23:45 +08:00
lichenever 84899159a4 fix_DTS 2021-09-18 11:09:34 +08:00
yangzhenzhang 278e82a849 update pipeline parallel 2020-11-18 13:55:34 +08:00
yangzhenzhang 0c2c76d037 update get rank in parallel ops 2020-11-13 16:43:44 +08:00
yangzhenzhang 41d925b68a set stage id 2020-11-12 11:14:31 +08:00
Yi Huaijie d7faa77b5e support int64 shape 2020-11-05 21:15:49 +08:00
huangxinjing 4ef439e27b Add stage information for ops and strategy 2020-09-25 10:42:43 +08:00
zhoufeng 663278112f optimize code compile performance
Signed-off-by: zhoufeng <zhoufeng54@huawei.com>
2020-08-18 14:33:24 +08:00
lichenever 6aa41f7be1 support nccl sub group 2020-07-21 09:15:33 +08:00
liubuyu 43c79eb853 mindspore path adjust 2020-07-14 18:07:28 +08:00