[v0.11] Add support for printing EUs (currently only in Gen9/Gen9.5)
This commit is contained in:
@@ -148,3 +148,10 @@ char* get_str_peak_performance_tensor(struct gpu_info* gpu) {
|
||||
return get_str_peak_performance_generic(gpu->peak_performance_t);
|
||||
}
|
||||
|
||||
char* get_str_generic(int32_t data) {
|
||||
// Largest int is 10, +1 for possible negative, +1 for EOL
|
||||
uint32_t max_size = 12;
|
||||
char* dummy = (char *) ecalloc(max_size, sizeof(char));
|
||||
snprintf(dummy, max_size, "%d", data);
|
||||
return dummy;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,12 @@ struct topology {
|
||||
int32_t tensor_cores;
|
||||
};
|
||||
|
||||
struct topology_i {
|
||||
int32_t slices;
|
||||
int32_t subslices;
|
||||
int32_t eu_subslice;
|
||||
};
|
||||
|
||||
struct memory {
|
||||
int64_t size_bytes;
|
||||
MEMTYPE type;
|
||||
@@ -59,6 +65,7 @@ struct gpu_info {
|
||||
int64_t freq;
|
||||
struct pci* pci;
|
||||
struct topology* topo;
|
||||
struct topology_i* topo_i;
|
||||
struct memory* mem;
|
||||
struct cache* cach;
|
||||
int64_t peak_performance;
|
||||
@@ -76,5 +83,6 @@ char* get_str_memory_clock(struct gpu_info* gpu);
|
||||
char* get_str_l2(struct gpu_info* gpu);
|
||||
char* get_str_peak_performance(struct gpu_info* gpu);
|
||||
char* get_str_peak_performance_tensor(struct gpu_info* gpu);
|
||||
char* get_str_generic(int32_t data);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "../common/gpu.hpp"
|
||||
|
||||
#include "../intel/uarch.hpp"
|
||||
#include "../intel/intel.hpp"
|
||||
#include "../cuda/cuda.hpp"
|
||||
#include "../cuda/uarch.hpp"
|
||||
|
||||
@@ -41,6 +42,7 @@ enum {
|
||||
ATTRIBUTE_CORESPERMP,
|
||||
ATTRIBUTE_CUDA_CORES,
|
||||
ATTRIBUTE_TENSOR_CORES,
|
||||
ATTRIBUTE_EUS,
|
||||
ATTRIBUTE_L2,
|
||||
ATTRIBUTE_MEMORY,
|
||||
ATTRIBUTE_MEMORY_FREQ,
|
||||
@@ -60,6 +62,7 @@ static const char* ATTRIBUTE_FIELDS [] = {
|
||||
"Cores/SM:",
|
||||
"CUDA Cores:",
|
||||
"Tensor Cores:",
|
||||
"Execution Units:",
|
||||
"L2 Size:",
|
||||
"Memory:",
|
||||
"Memory frequency:",
|
||||
@@ -79,6 +82,7 @@ static const char* ATTRIBUTE_FIELDS_SHORT [] = {
|
||||
"Cores/SM:",
|
||||
"CUDA Cores:",
|
||||
"Tensor Cores:",
|
||||
"EUs:",
|
||||
"L2 Size:",
|
||||
"Memory:",
|
||||
"Memory freq.:",
|
||||
@@ -366,11 +370,13 @@ bool print_gpufetch_intel(struct gpu_info* gpu, STYLE s, struct color** cs, stru
|
||||
char* uarch = get_str_uarch_intel(gpu->arch);
|
||||
char* gt = get_str_gt(gpu->arch);
|
||||
char* manufacturing_process = get_str_process(gpu->arch);
|
||||
char* eus = get_str_eu(gpu);
|
||||
|
||||
setAttribute(art, ATTRIBUTE_NAME, gpu_name);
|
||||
setAttribute(art, ATTRIBUTE_UARCH, uarch);
|
||||
setAttribute(art, ATTRIBUTE_TECHNOLOGY, manufacturing_process);
|
||||
setAttribute(art, ATTRIBUTE_GT, gt);
|
||||
setAttribute(art, ATTRIBUTE_EUS, eus);
|
||||
|
||||
const char** attribute_fields = ATTRIBUTE_FIELDS;
|
||||
uint32_t longest_attribute = longest_attribute_length(art, attribute_fields);
|
||||
|
||||
Reference in New Issue
Block a user