Changes to default choices of sub-configuration

amdzen and x86_64 configuration family: On Intel processors supporting
AVX-512, the zen4 sub-configuration was dispatched by default, as even
though it is not optimized specifically for Intel processors, it includes
a range of additional optimizations than are present in the the older skx
sub-configuration. However, the zen4 data path is 256 bit, thus this
sub-configuration uses a mixture of AVX2 and AVX-512 kernels. Now that
zen5 sub-configuration is available, with more extensive use of AVX-512
kernels, switch to use this by default on relevant Intel processors.

intel64 configuration family: On AMD processors supporting AVX-512 or
AVX2, the generic sub-configuation was dispatched by default. Change to
dispatch skx or haswell sub-configuation, based on the available ISA
support.

AMD-Internal: [CPUPL-6743]
This commit is contained in:
Smyth, Edward
2025-08-06 07:56:53 +01:00
committed by GitHub
parent 6db8639284
commit efdb5a06df

View File

@@ -154,10 +154,18 @@ arch_t bli_cpuid_query_id( void )
{
// Check for each Intel configuration that is enabled, check for that
// microarchitecture. We check from most recent to most dated.
#ifdef BLIS_CONFIG_ZEN5
// Even if not optimized for Intel processors, this should
// generally perform better than skx codepath.
// Currently only enabled for zen5 and amdzen configurations
if ( is_avx512_supported )
return BLIS_ARCH_ZEN5;
#endif
#ifdef BLIS_CONFIG_ZEN4
// Even if not optimized for Intel processors, this should
// generally perform better than skx codepath.
// Currently only enabled for zen4 and amdzen configurations
// Use zen4 if zen5 is not available.
if ( is_avx512_supported )
return BLIS_ARCH_ZEN4;
#endif
@@ -249,6 +257,15 @@ arch_t bli_cpuid_query_id( void )
#ifdef BLIS_CONFIG_BULLDOZER
if ( bli_cpuid_is_bulldozer( family, model, features ) )
return BLIS_ARCH_BULLDOZER;
#endif
// Tests in case we are using intel64 config on AMD platform
#ifdef BLIS_CONFIG_SKX
if ( is_avx512_supported )
return BLIS_ARCH_SKX;
#endif
#ifdef BLIS_CONFIG_HASWELL
if ( is_avx2fma3_supported )
return BLIS_ARCH_HASWELL;
#endif
// If none of the other sub-configurations were detected, return
// the 'generic' arch_t id value.