bgawrych opened a new pull request #18885: URL: https://github.com/apache/incubator-mxnet/pull/18885
## Description ## This PR deals with issue https://github.com/apache/incubator-mxnet/issues/18854 Benchmark: ``` import mxnet as mx import time mx.random.seed(123) tic = time.time() for i in range(1000): rand_a = mx.nd.random.randint(1000, 10000).asscalar() rand_b = mx.nd.random.randint(1000, 10000).asscalar() shape = (rand_a, rand_b) a = mx.nd.random.uniform(shape=shape) b = mx.nd.softmax(a) a.wait_to_read() b.wait_to_read() toc = time.time() print(toc - tic) ``` Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz (without AVX512) ``` KMP_AFFINITY=granularity=fine,noduplicates,compact,1,0 OMP_NUM_THREADS=12 numactl --physcpubind=0-11 --membind=0 python3 bench.py ``` | Aligned | Not Aligned | | ------ | ------ | | 232.6839632987976 | 225.73387098312378 | | 231.99822640419006 | 225.51357173919678 | It's about 3% performance drop on this particular test case. Intel(R) Xeon(R) Platinum 8260L CPU @ 2.40GHz ``` KMP_AFFINITY=granularity=fine,noduplicates,compact,1,0 OMP_NUM_THREADS=24 numactl --physcpubind=0-23 --membind=0 python3 bench.py ``` | Aligned | Not Aligned | | ------ | ------ | | 15.814676523208618 | 15.833234071731567 | | 15.925291061401367 | 15.907763004302979 | | 15.941178321838379 | 15.9696786403656| | 16.01563811302185 | 16.00200080871582 | For better CPU with AVX512 there is no difference in this case ## Checklist ## ### Essentials ### Please feel free to remove inapplicable items for your PR. - [x] Changes are complete (i.e. I finished coding on this PR) - [x] All changes have test coverage: - [x] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
