[v0.11] Print peak performance in Intel iGPU
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user