Re: [闲聊] 如何绕过matlab 弱化AMD CPU功能

楼主: takahashikag (那来自某岛的苏州军部长)   2019-11-29 14:08:00
: 推 a58524andy : 懒人包:if amd ignore avx2 sse3 sse4 11/28 11:35
: → windrain0317: 就matlab用了intel mkl啊 11/28 11:39
: → a58524andy : 里面是说mkl开哪些指令是依据vendor而非指令列表 11/28 11:40
: → a58524andy : 所以用一些环境变量硬让他开起来ryzen就扳回一城惹 11/28 11:41
: → a58524andy : 测试结果来说i+mkl还是有些优势啦,像是矩阵乘法那 11/28 11:42
: → a58524andy : 项,18c36t的10980xe还是赢过24c48t的3960x 11/28 11:43
: → a58524andy : 3970x才赢过10980xe 11/28 11:43
: 推 ariadne : AMD也可以自己出MKL 这方面intel真的有下成本 11/28 11:47
: 推 doom3 : 对手CPU只用SSE1 也太针对了吧 11/28 13:34
: 推 twosheep0603: numpy系列好像也有MKL的问题 改参数会起飞XD 11/28 15:31
: → pig : 堆土机时代根本不会有人在乎这个啊 AVX1/2 有开跟没 11/28 15:42
: → pig : 开差不了多少吧 XD 11/28 15:43
: → pig : 到了 zen 才开始有人注意,用的人多了自然就会改正 11/28 15:44
有玩机械学习写 Python Code 的,如果换香香机应该也会想:
喵的怎么有时候 3700x 跑不赢不知到多少年前的 E3-1230v2
对,我就是跑 SVM 跟 Naive Bayes 时越想越不对劲
然后我找到了 Reddit 讨论串跟 GitHub 上的资源
http://bit.ly/2L3w5Fy , Reddit, Ryzen and Intel's Anti-competitive MKL
http://bit.ly/2R0sD2j , Ryzen 3900X vs Intel Xeon 2175W, Python numpy
重点就是这段,尤其开发环境是 Anaconda 的用户应该连署去逼社群改写这种垃圾奥步
Intel's MKL check the CPUID is GenuineIntel or not, if detected the non-intel cpu, MKL will choose the "maximum capability" code (i.e. SSE2 - slowset) Intel's "cripple AMD" function Anaconda's numpy use Intel TBB instead of OpenMP, Intel TBB use the intel's proprietary method to detect the CPU or NUMA topology, in this situation zen's SMT will be recognize to the real core, it hurt the ALU performance.
GitHub 上有改善方案,但我怕把 Anaconda 炸掉所以观望
http://bit.ly/34vjvqr
但光是用 n_jobs 这个参数去强迫 sklearn 使用 Ryzen 的所有核心,都能把原来的运算时间压缩到 20% 甚至更少
https://i.imgur.com/Dqfz9ta.png
https://i.imgur.com/XAua4cn.png
这招真的是 intel 效能输人家的时候最爱在编译器搞的烂招
我想应该最早可以追溯到 2000 前后的 3DMark,就是那个 Pentium4 被 Athlon 锤爆的时代
对, AMD Ryzen 的 Python Performance 就是输在 intel 把二十年前的烂招回锅
作者: twosheep0603 (两羊)   2019-11-29 15:11:00
一次钓出两只XDDD
作者: windrain0317 (你在大声啥)   2019-11-29 19:28:00
文中测试numpy,intel就靠AVX512冲的

Links booklink

Contact Us: admin [ a t ] ucptt.com