[v0.20] Rename CUDA topology struct to improve consistency

This commit is contained in:
Dr-Noob
2021-12-19 11:34:05 +01:00
parent e7477610e1
commit 4e0e6b5ab5
3 changed files with 16 additions and 14 deletions

View File

@@ -36,13 +36,15 @@ struct cache {
struct cach* L2;
};
struct topology {
// CUDA topology
struct topology_c {
int32_t streaming_mp;
int32_t cores_per_mp;
int32_t cuda_cores;
int32_t tensor_cores;
};
// Intel topology
struct topology_i {
int32_t slices;
int32_t subslices;
@@ -63,7 +65,7 @@ struct gpu_info {
char* name;
int64_t freq;
struct pci* pci;
struct topology* topo;
struct topology_c* topo_c;
struct topology_i* topo_i;
struct memory* mem;
struct cache* cach;

View File

@@ -438,7 +438,7 @@ bool print_gpufetch_cuda(struct gpu_info* gpu, STYLE s, struct color** cs, struc
setAttribute(art, ATTRIBUTE_STREAMINGMP, sms);
setAttribute(art, ATTRIBUTE_CORESPERMP, corespersm);
setAttribute(art, ATTRIBUTE_CUDA_CORES, cores);
if(gpu->topo->tensor_cores > 0) {
if(gpu->topo_c->tensor_cores > 0) {
setAttribute(art, ATTRIBUTE_TENSOR_CORES, tensorc);
}
setAttribute(art, ATTRIBUTE_MEMORY, mem);
@@ -446,7 +446,7 @@ bool print_gpufetch_cuda(struct gpu_info* gpu, STYLE s, struct color** cs, struc
setAttribute(art, ATTRIBUTE_BUS_WIDTH, bus_width);
setAttribute(art, ATTRIBUTE_L2, l2);
setAttribute(art, ATTRIBUTE_PEAK, pp);
if(gpu->topo->tensor_cores > 0) {
if(gpu->topo_c->tensor_cores > 0) {
setAttribute(art, ATTRIBUTE_PEAK_TENSOR, pp_tensor);
}