incorrect CPU detection on AMD Jaguar/Puma architectures
Our CPU detection seems to assume on x86 either Intel, older AMD with SSE4.1 or newer with Bulldozer architecture with. These assumptions don't take into account the AMD Jaguar, Puma[+] architectures in mobile/low-power AMD chips (and AFAICT the Excavator AVX2 support may not work either).
As a result, the v5.x detection simply assumes that newer AMD should use
GMX_SIMD=AVX_128_FMA, but as FMA is not supported on these arch. the binaries obviously won't work.
In the current master, unfortunate the build- and tun-time detection have diverged and give contradicting results: while the built-time detection gets
GMX_SIMD=AVX_256 right, the runtime detection claims that
AVX_128_FMA would be better.
- v5.x needs fixing to prevent incorrect SIMD detection and crashing binaries
- v'16 needs run-time detection fix
- v'16 danger of detection inconsistency needs to be considered (opened separate issue)
- Excavator support?
- consider whether AVX-128 could be better on these platforms (though performance is not a great concern on these rare and low-power CPUs, I'd say)
Fix SIMD detection on new AMD AVX CPUs w/o fma
We earlier assumed that all AMD CPUs had fma
support and could use AVX_128_FMA, but with this
change we properly detect it and revert to
Fixes #1906 for release-5.1.
Fix SIMD detection on AMD AVX CPUs w/o fma (master)
This is essentially the same fix as for release-5.1,
but since the cpu detection code has been rewritten from
scrath this part has been moved to the SIMD module.
#3 Updated by Szilárd Páll over 4 years ago
- File test_gmx51_1x1_cpu_sse-4.1.log test_gmx51_1x1_cpu_sse-4.1.log added
- File test_gmx51_1x1_cpu_avx-256.log test_gmx51_1x1_cpu_avx-256.log added
- File test_gmx51_1x1_cpu_sse-4.1-mavx.log test_gmx51_1x1_cpu_sse-4.1-mavx.log added
Took some time to compile, this CPU isn't too fast, to be honest.
Logs attached. Performance seems best with 128-bit instructions, but the difference between AVX_256 and SSE4.1+-mavx is, not that big.