5 ms·
There is a longstanding issue around MKL and OpenBLAS optimization flags making intel systems artificially faster than amd ones for numpy computations. https://
by mushufasa 5y ago
There is a longstanding issue around MKL and OpenBLAS optimization flags making intel systems artificially faster than amd ones for numpy computations. https://stackoverflow.com/questions/62783262/why-is-numpy-with-ryzen-threadripper-so-much-slower-than-xeon https://stackoverflow.com/questions/62783262/why-is-numpy-wi...
If there are true optimizations to be had, wonderful. But those should be added to core binaries pypi / conda. I am worried that Intel here may be trying to again artificially segment their optimization work on their math libraries for business rather than technical reasons.
- jxy 5y agoThat SO performance benchmark would be so much more useful if the OP had also run OpenBlas on the xeon.
- thunkshift1 5y agoWhat do you mean by ‘artificially faster’?
- jchw 5y agoIntel libraries whitelist their own CPUs for using certain extension instruction sets, instead of using the relevant CPU ID feature flag for that feature as their own documentation tells you to.
- jeffbee 5y agoCPUID is insufficient. CPUID can tell you that a CPU has a working PDEP/PEXT, but it can't tell you that a CPU's PDEP sucks like the one on all AMD processors prior to Zen3.
- sitkack 5y agoThe real answer is to do feature probing and benchmarking the underlying implementation. In the cloud you never really know the hardware backing your instance.
- jchw 5y agoThis argument crops up every time but it’s irrelevant; MKL does and always has worked absolutely fine on AMD processors with the checks disabled, and no, reproducibility is not a feature of MKL that is enabled by default and it never was. Intel even had to add a disclaimer that MKL doesn’t work properly on non-Intel processors after legal threats, and they still ran with that for literally years despite knowing it could just be fixed. When this first cropped up, I was using Digg. Edit: removed note that they fixed the cripple AMD function; they didn’t, they actually just removed the workaround that made it easier to disable the checks; I was misinformed. Apparently now some software does runtime patching to fix it, including Matlab...
- jeffbee 5y agoYeah I don't think all the hacks are out, yet. But my point is only that the availability of some feature is not the only input to the decision to use that feature at runtime. Some of these conditions may look suspiciously like shorthand for IsGenuineIntel(), even if they are legit, like blacklisting BMI2 on AMD, because BMI2 on AMD was useless over most of its history.
- gnufx 5y agoRecent MKL will generate reasonable code for Zen if you set a magic environment variable, but it was very limited (possibly only sgemm and/or dgemm when I looked). Once you've generated AVX2 with a reasonable block size, you're most of the way there. But why not just use a free BLAS which has been specifically tuned for your AMD CPU (and probably your Intel one)?
- user5994461 5y agoNope, they removed support for the magic environment variable in the latest MKL release.
- gnufx 5y agoI stand corrected. No loss, anyway. (I probably saw it in oneapi from sometime last year, and was surprised.)
- dsign 5y agoThanks for bringing out that link, I had had that nagging question about how specific Intel performance libraries were to Intel hardware. At least in this case, it seems not much.
- vitorsr 5y ago> those should be added to core binaries pypi / conda They have. PyPI: https://pypi.org/user/Intel-Python https://pypi.org/user/Intel-Python https://pypi.org/user/IntelAutomationEngineering https://pypi.org/user/IntelAutomationEngineering https://pypi.org/user/sat-bot https://pypi.org/user/sat-bot Anaconda: https://anaconda.org/intel https://anaconda.org/intel
- mistrial9 5y agowhat, no Debian/Ubuntu ? sigh
- zvr 5y agoOf course: echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list You can read the "apt" section of the package managers, if that's what you prefer. https://software.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top/installation/install-using-package-managers/apt.html https://software.intel.com/content/www/us/en/develop/documen...
- mistrial9 5y agoaha - like so https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-ai-linux/top.html https://software.intel.com/content/www/us/en/develop/documen...
- pletnes 5y agoFrom a practical perspective you have to use some BLAS library. If there is a working alternative from AMD, it would be great if you share it. They did have one in the past although I don’t recall its name.
- mhh__ 5y agoDo AMD even have optimized packages available? Don't get me wrong, I'm not a huge fan of what Intel get up to but AMD's profiling software is dreadful so I'm not exactly surprised that Intel don't even entertain the option.
- gnufx 5y agoAt least single-threaded "large" OpenBLAS GEMM has always been similar to MKL once it has the micro-architecture covered. If there's some problem with the threaded version (which one?), has it been reported like it would be for use in Julia? Anyway, on AMD, why wouldn't you use AMD's BLAS (just a version of BLIS). That tends to do well multi-threaded, though I'm normally only interested in single-threaded performance. I don't understand why people are so obsessed with MKL, especially when they don't measure and understand the measurements.