Commit Graph

24 Commits

Author SHA1 Message Date
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
jiangshuqiang c2bd061889 fix summary isolation 2021-09-18 10:59:14 +08:00
huanghui ba66c0d491 add security isolate for save_graphs 2021-09-14 10:24:12 +08:00
l00591931 680324f225 Change make tuple in core.ops 2021-03-05 10:54:33 +08:00
l00591931 cf7c5840e3 Change return 2021-03-04 09:38:43 +08:00
l00591931 9ec100d069 Change TensorAdd to Add, from r1.1 to master 2021-02-01 17:53:52 +08:00
mindspore-ci-bot 9fa0499fa0 Change GatherV2 to Gather r1.1 to master 2021-01-30 14:13:47 +08:00
yuchaojie 1932d87a26 update some op's attr name 2021-01-20 09:16:43 +08:00
Yi Huaijie d7faa77b5e support int64 shape 2020-11-05 21:15:49 +08:00
梁成辉 34d433fd9a Set io format for old backend 2020-08-26 20:49:15 +08:00
mindspore-ci-bot b2a5440548 !4883 Fix compilation warnings
Merge pull request !4883 from zhoufeng/xiu-ba-ge
2020-08-21 12:33:20 +08:00
zhoufeng 22ec976ef7 fix compilation warnings
Signed-off-by: zhoufeng <zhoufeng54@huawei.com>
2020-08-21 09:44:04 +08:00
zhousiyi d0e58dd765 remove ccsrc/common.h
replace frontend/operator/ops.h in backend with base/core_ops.h as
backend should not use any frontend-only primitive
2020-08-20 09:34:07 +00:00
zhoufeng 663278112f optimize code compile performance
Signed-off-by: zhoufeng <zhoufeng54@huawei.com>
2020-08-18 14:33:24 +08:00
liubuyu 45b6600001 mv cc file that end with py to pybind 2020-08-12 14:50:18 +08:00
liubuyu f4bc0bc9fe move the dependency of utils to core 2020-07-27 10:28:46 +08:00
liubuyu 43c79eb853 mindspore path adjust 2020-07-14 18:07:28 +08:00
He Wei 43e0967024 Decouple ir::Tensor class from python 2020-06-24 10:28:59 +08:00
leopz 4508134ceb add tensor_minnie and separate py from ir 2020-05-28 14:26:26 +08:00
changzherui b323199dc1 syn code 430 2020-04-30 17:55:12 +08:00
zhaozhenlong 66e7a36846 ImageGradients check 4d
fix DiagPart constant folding issue

fix argmin output type check

fix atan2 doc error

fix remove FusedBatchNorm and its grad
2020-04-29 21:47:33 +08:00
zhaozhenlong 89f82e1a37 fix cpp ut test TestConvertConvBackpropFilter 2020-04-24 19:04:40 +08:00
ougongchang 0ed6d9178e add Histogram summary operator
clean clang format errors and cpplint errors

add some test cases for histogram summary operator
2020-04-18 09:56:45 +08:00
zhunaipan 930a1fb0a8 initial version
Signed-off-by: leonwanghui <leon.wanghui@huawei.com>
2020-03-27 22:54:54 +08:00