incorrect CPU detection on AMD Jaguar/Puma architectures - Redmine #1906
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.
Summary:
- 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)
(from redmine: issue id 1906, created on 2016-02-17 by pszilard, closed on 2016-05-08)
- Relations:
- relates #1907 (closed)
- Changesets:
- Revision e4e3fe7e by Erik Lindahl on 2016-04-04T00:43:11Z:
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
AVX_256 otherwise.
Fixes #1906 for release-5.1.
Change-Id: I803a6bfa75c5069b73023688a477cfca03c1ddcd
- Revision dd8f72ac by Erik Lindahl on 2016-05-05T02:44:10Z:
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.
Fixes #1906.
Change-Id: Ie25d6013c737279ece902d40d1f54a6e3c5966bb
- Uploads:
- athlon-5350_cpuinfo.txt Jaguar arch / Athlon 5350 /proc/cpuinfo
- test_gmx51_1x1_cpu_sse-4.1.log
- test_gmx51_1x1_cpu_avx-256.log
- test_gmx51_1x1_cpu_sse-4.1-mavx.log