From d69473c8f72735bf19fa41b43042ec6f941bcd5b Mon Sep 17 00:00:00 2001 From: Edward Smyth Date: Tue, 30 Aug 2022 02:43:50 -0400 Subject: [PATCH] Update zen4 test in bli_cpuid.c Remove test on is_arch in bli_cpuid_is_zen4() so it will report true for all Zen4 models, based on family and AVX512 feature tests. AMD-Internal: [CPUPL-2474] Change-Id: I85d2e230b33391d5c9779df4585ae2a358788e72 --- frame/base/bli_cpuid.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/frame/base/bli_cpuid.c b/frame/base/bli_cpuid.c index 4dba53080..2796fadc0 100644 --- a/frame/base/bli_cpuid.c +++ b/frame/base/bli_cpuid.c @@ -295,14 +295,10 @@ bool bli_cpuid_is_zen4 // For zen4 the family id is 0x19 if ( family != 0x19 ) return FALSE; - // Finally, check for specific models: - // Zen 4 maps to couple of different model number ranges - // we check for all of them. - const bool is_arch - = - (0x10 <= model && model <= 0x1f ); - - if ( !is_arch ) return FALSE; + // All family 0x19 CPUs that support AVX512 instructions are zen4, + // thus no need to check model numbers here. Family 0x19 CPUs that + // don't support AVX512 are zen3. Their model ranges are tested in + // a separate function below. return TRUE; }