mirror of
https://github.com/amd/blis.git
synced 2026-05-25 10:54:33 +00:00
BLIS: bli_cpuid.c incorrectly selecting zen5 on zen4 hardware
Correct the order of tests in bli_cpuid.c to test all known zen AVX512 platforms before considering fallback tests on AVX512 support. This avoids builds with "configure auto" or "cmake -DBLIS_CONFIG_FAMILY=auto" incorrectly selecting zen5 sub-configuration on zen4 systems. AMD-Internal: [CPUPL-4966] Change-Id: I8706382e2df7c9ae4bb456e3a7f465053e15beea
This commit is contained in:
@@ -190,12 +190,21 @@ arch_t bli_cpuid_query_id( void )
|
||||
#ifdef BLIS_CONFIG_ZEN5
|
||||
if ( bli_cpuid_is_zen5( family, model, features ) )
|
||||
return BLIS_ARCH_ZEN5;
|
||||
#endif
|
||||
#ifdef BLIS_CONFIG_ZEN4
|
||||
if ( bli_cpuid_is_zen4( family, model, features ) )
|
||||
return BLIS_ARCH_ZEN4;
|
||||
#endif
|
||||
#ifdef BLIS_CONFIG_ZEN5
|
||||
// Fallback test for future AMD processors
|
||||
// Assume zen5 (if available) is preferable to zen4.
|
||||
if ( is_avx512_supported )
|
||||
return BLIS_ARCH_ZEN5;
|
||||
#endif
|
||||
#ifdef BLIS_CONFIG_ZEN4
|
||||
if ( bli_cpuid_is_zen4( family, model, features ) )
|
||||
// Fallback test for future AMD processors
|
||||
// Use zen4 if zen5 is not available.
|
||||
if ( is_avx512_supported )
|
||||
return BLIS_ARCH_ZEN4;
|
||||
#endif
|
||||
#ifdef BLIS_CONFIG_ZEN3
|
||||
|
||||
Reference in New Issue
Block a user