mindspore/scripts
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
..
build Replace std::unordered_map/set with robin-hood-hashing 2021-11-24 10:47:40 +08:00
conda add docker & conda scripts for 1.5.0 2021-10-13 10:43:43 +08:00
docker fix docker script due to pillow update 2021-10-20 11:22:35 +08:00
map_dump_file_to_code update_dump_map 2021-01-25 11:26:35 +08:00
check_clang_format.sh Add Exception log when AscendMemoryPool::AllocTensorMem fail 2021-11-16 09:28:28 +08:00
check_tid.sh Optimize isa() and type id related code. 2021-11-03 14:14:44 +08:00
dot2svg.sh initial version 2020-03-27 22:54:54 +08:00
format_source_code.sh add c api 2021-11-23 05:11:45 -08:00
get_bert_shape_from_pytest.sh initial version 2020-03-27 22:54:54 +08:00
get_op_use_count.sh initial version 2020-03-27 22:54:54 +08:00
get_shape_from_ir.sh fix some bug in quant debug 2020-05-12 14:05:54 +08:00
lite_release_package.sh copy lite ohos package to release path 2021-09-26 17:14:01 +08:00
run_perf_test.sh replace tab with spaces 2021-02-23 09:41:47 +08:00
setdotlabelwidth initial version 2020-03-27 22:54:54 +08:00
update_onnx_weight.py redundant codes clean 2020-09-22 17:08:09 +08:00