Fix PP in Ice Lake

This commit is contained in:
Dr-Noob
2020-08-31 18:27:32 +02:00
parent 1a9c0546f2
commit ab1416563c
4 changed files with 10 additions and 2 deletions

View File

@@ -638,7 +638,10 @@ char* get_str_peak_performance(struct cpuInfo* cpu, struct topology* topo, int64
if(cpu->FMA3 || cpu->FMA4) if(cpu->FMA3 || cpu->FMA4)
flops = flops*2; flops = flops*2;
if(cpu->AVX512) // Ice Lake has AVX512, but it has 1 VPU for AVX512, while
// it has 2 for AVX2. If this is a Ice Lake CPU, we are computing
// the peak performance supposing AVX2, not AVX512
if(cpu->AVX512 && vpus_are_AVX512(cpu))
flops = flops*16; flops = flops*16;
else if(cpu->AVX || cpu->AVX2) else if(cpu->AVX || cpu->AVX2)
flops = flops*8; flops = flops*8;

View File

@@ -6,7 +6,7 @@
#include "cpuid.h" #include "cpuid.h"
#include "global.h" #include "global.h"
static const char* VERSION = "0.62"; static const char* VERSION = "0.63";
void print_help(char *argv[]) { void print_help(char *argv[]) {
printf("Usage: %s [--version] [--help] [--levels] [--style fancy|retro|legacy] [--color 'R,G,B:R,G,B:R,G,B:R,G,B']\n\ printf("Usage: %s [--version] [--help] [--levels] [--style fancy|retro|legacy] [--color 'R,G,B:R,G,B:R,G,B:R,G,B']\n\

View File

@@ -346,6 +346,10 @@ struct uarch* get_uarch_from_cpuid(struct cpuInfo* cpu, uint32_t ef, uint32_t f,
return get_uarch_from_cpuid_amd(ef, f, em, m, s); return get_uarch_from_cpuid_amd(ef, f, em, m, s);
} }
bool vpus_are_AVX512(struct cpuInfo* cpu) {
return cpu->arch->uarch != UARCH_ICE_LAKE;
}
int get_number_of_vpus(struct cpuInfo* cpu) { int get_number_of_vpus(struct cpuInfo* cpu) {
if(cpu->cpu_vendor == VENDOR_AMD) if(cpu->cpu_vendor == VENDOR_AMD)
return 1; return 1;

View File

@@ -8,6 +8,7 @@
struct uarch; struct uarch;
struct uarch* get_uarch_from_cpuid(struct cpuInfo* cpu, uint32_t ef, uint32_t f, uint32_t em, uint32_t m, int s); struct uarch* get_uarch_from_cpuid(struct cpuInfo* cpu, uint32_t ef, uint32_t f, uint32_t em, uint32_t m, int s);
bool vpus_are_AVX512(struct cpuInfo* cpu);
int get_number_of_vpus(struct cpuInfo* cpu); int get_number_of_vpus(struct cpuInfo* cpu);
#endif #endif