diff --git a/src/common/printer.cpp b/src/common/printer.cpp index 6806fb5..00d5404 100644 --- a/src/common/printer.cpp +++ b/src/common/printer.cpp @@ -372,6 +372,7 @@ bool print_gpufetch_intel(struct gpu_info* gpu, STYLE s, struct color** cs, stru char* manufacturing_process = get_str_process(gpu->arch); char* eus = get_str_eu(gpu); char* max_frequency = get_str_freq(gpu); + char* pp = get_str_peak_performance(gpu); setAttribute(art, ATTRIBUTE_NAME, gpu_name); setAttribute(art, ATTRIBUTE_UARCH, uarch); @@ -379,6 +380,7 @@ bool print_gpufetch_intel(struct gpu_info* gpu, STYLE s, struct color** cs, stru setAttribute(art, ATTRIBUTE_FREQUENCY, max_frequency); setAttribute(art, ATTRIBUTE_GT, gt); setAttribute(art, ATTRIBUTE_EUS, eus); + setAttribute(art, ATTRIBUTE_PEAK, pp); const char** attribute_fields = ATTRIBUTE_FIELDS; uint32_t longest_attribute = longest_attribute_length(art, attribute_fields); diff --git a/src/intel/intel.cpp b/src/intel/intel.cpp index fa8647b..96a83fd 100644 --- a/src/intel/intel.cpp +++ b/src/intel/intel.cpp @@ -8,6 +8,10 @@ #include "../common/pci.hpp" #include "../common/global.hpp" +int64_t get_peak_performance(struct gpu_info* gpu) { + return gpu->freq * 1000000 * gpu->topo_i->eu_subslice * gpu->topo_i->subslices * 8 * 2; +} + struct gpu_info* get_gpu_info_intel() { struct gpu_info* gpu = (struct gpu_info*) emalloc(sizeof(struct gpu_info)); gpu->vendor = GPU_VENDOR_INTEL; @@ -18,6 +22,7 @@ struct gpu_info* get_gpu_info_intel() { gpu->name = get_name_from_uarch(gpu->arch); gpu->topo_i = get_topology_info(gpu->arch); gpu->freq = get_max_freq_from_file(gpu->pci); + gpu->peak_performance = get_peak_performance(gpu); return gpu; }