[v0.30] Add uarch detection to AMD GPUs
Similarly to NVIDIA and Intel GPUs, we now detect microarchitecture, also with manufacturing process and specific chip name. We infer all of this from the gfx name (in the code we use the term llvm_target), altough it's not clear yet that this method is completely reliable (see comments for more details). In the future we might want to replace that with a better way. Once we have the gfx name, we *should* be able to infer the specific chip, and from the chip we can easily infer the microarchitecture. This commit also includes some refactorings and code improvements on the HSA backend.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "../intel/uarch.hpp"
|
||||
#include "../intel/intel.hpp"
|
||||
#include "../hsa/hsa.hpp"
|
||||
#include "../hsa/uarch.hpp"
|
||||
#include "../cuda/cuda.hpp"
|
||||
#include "../cuda/uarch.hpp"
|
||||
|
||||
@@ -490,10 +491,18 @@ bool print_gpufetch_amd(struct gpu_info* gpu, STYLE s, struct color** cs, struct
|
||||
return false;
|
||||
|
||||
char* gpu_name = get_str_gpu_name(gpu);
|
||||
char* gpu_chip = get_str_chip(gpu->arch);
|
||||
char* uarch = get_str_uarch_hsa(gpu->arch);
|
||||
char* manufacturing_process = get_str_process(gpu->arch);
|
||||
char* sms = get_str_cu(gpu);
|
||||
char* max_frequency = get_str_freq(gpu);
|
||||
|
||||
setAttribute(art, ATTRIBUTE_NAME, gpu_name);
|
||||
if (gpu_chip != NULL) {
|
||||
setAttribute(art, ATTRIBUTE_CHIP, gpu_chip);
|
||||
}
|
||||
setAttribute(art, ATTRIBUTE_UARCH, uarch);
|
||||
setAttribute(art, ATTRIBUTE_TECHNOLOGY, manufacturing_process);
|
||||
setAttribute(art, ATTRIBUTE_FREQUENCY, max_frequency);
|
||||
setAttribute(art, ATTRIBUTE_STREAMINGMP, sms);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user