4 ms·
What do you mean by ‘artificially faster’?
by thunkshift1 5y ago
What 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.)