Re: [閒聊] 如何繞過matlab 弱化AMD CPU功能
重演2006當年Intel Skype 事件的奧步
有玩機械學習寫 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, I
ntel 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% 甚至更少
這招真的是 intel 效能輸人家的時候最愛在編譯器搞的爛招
我想應該最早可以追溯到 2000 前後的 3DMark,就是那個 Pentium4 被 Athlon 鎚爆的
時代
對, AMD Ryzen 的 Python Performance 就是輸在 intel 把二十年前的爛招回鍋
--