[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:
13
src/hsa/uarch.hpp
Normal file
13
src/hsa/uarch.hpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef __HSA_UARCH__
|
||||
#define __HSA_UARCH__
|
||||
|
||||
#include "../common/gpu.hpp"
|
||||
|
||||
struct uarch;
|
||||
|
||||
struct uarch* get_uarch_from_hsa(struct gpu_info* gpu, char* gpu_name);
|
||||
char* get_str_uarch_hsa(struct uarch* arch);
|
||||
char* get_str_process(struct uarch* arch); // TODO: Shouldnt we define this in the cpp?
|
||||
char* get_str_chip(struct uarch* arch);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user