3 ms·
I keep seeing complaints about MKL not supporting other architectures. Why do people care? For instance, for linear algebra, use BLIS (like AMD do), or OpenBL
by gnufx 7y ago
I keep seeing complaints about MKL not supporting other architectures. Why do people care? For instance, for linear algebra, use BLIS (like AMD do), or OpenBLAS. Intel actually support BLIS (at least to some extent), and I'm not aware of libxsmm being Intel-only, though I haven't checked. MKL-DNN (whatever it's called now) also appeared to be fairly generic when I looked.
- jchw 7y agoMy complaint with MKL is that Intel is intentionally harming performance by only allowing AVX2 code to run on Intel’s own processors. It does not matter if there are alternatives because having the ability to avoid something doesn’t excuse bad behavior. That said, if you’re relying on a dependency that uses MKL i guess you are probably SOL without hacks.
- gnufx 7y agoI don't know how MKL works, but it's been reported that you can make it run on AMD processors for no good reason. I do know that you're harming performance if you use an implementation for a different micro-architecture rather than one that's correctly tuned. Assuming we're talking GEMM, you don't get the performance just with generic SIMD code. You need to worry about details of caches and instruction latencies, in particular. Consider that you should even avoid AVX512 on some processors. I'm no apologist for Intel, but I suppose people running MKL on AMD would complain that it was slow because it was wrongly tuned. Note that BLIS gets quite close to MKL on Intel anyhow, and the timing variance of a typical HPC application is likely to be greater than the contribution of ~10% from GEMM. I don't know what people do that's MKL-specific, but its major functionality is available in free implementations that will be infinitely faster on POWER and ARM apart from AMD.
- jchw 7y agoNow I can’t claim to be an expert by any means but I feel like you are over complicating this. For one, we know in practice the performance is much better when you force enable AVX2 on AMD with MKL; it was benchmarked. For another, that’s already obvious, because even without micro optimizing we’re still talking about codepaths that are able to better fill the processor and support 256 bit integers. Certainly not everything will always be straightforward but MKL seems like one of the single most obvious libraries for this. Further, Intel has a rich history here. They have been sued and lost over Intel C++ Compiler’s “Cripple AMD” bit. Funny thing is, it's still there. Although now Intel has warnings throughout their pages. Guess removing a strcmp cpuid, “GenuineIntel” was too much work. Let’s be realistic. Intel wants to win the benchmarks. There’s no need to construct an elaborate reality where this is all done out of concern that they might make performance worse on microarchitectures they did not design.