add support for GPUs using wavefront size of 32 (#285)
* add gfx1100 support Add support for Radeon 7900 GPUs (RX and PRO), and 7800 PRO. I was contemplating to add gfx1101 and gfx1102 GPUs as well, but those are the lower end models that are more unlikely to be used for compute intensive jobs. In addition, I do not have access to them to test the support. * update WF_SIZe for different options Radeon systems use a WarpSize of 32, unlike current Instinct systems, which use a warp size of 64. For the device side, a gfx specific ifdef is sufficient. For the host side, we need to query the device properties. * adjust functional tests to wf_size of 32 * update unit tests to handle wf_size of 32 * address reviewer comments
This commit is contained in:
@@ -44,6 +44,21 @@ typedef struct device_agent {
|
||||
std::vector<device_agent_t> gpu_agents;
|
||||
std::vector<device_agent_t> cpu_agents;
|
||||
|
||||
std::vector<device_prop_t> device_properties;
|
||||
|
||||
static void device_properties_init(void) {
|
||||
int numDevices;
|
||||
CHECK_HIP(hipGetDeviceCount(&numDevices));
|
||||
|
||||
device_prop_t prop;
|
||||
hipDeviceProp_t hipprop;
|
||||
for (int i=0; i<numDevices; i++) {
|
||||
CHECK_HIP(hipGetDeviceProperties(&hipprop, i));
|
||||
prop.warpSize = hipprop.warpSize;
|
||||
prop.maxThreadsPerBlock = hipprop.maxThreadsPerBlock;
|
||||
device_properties.push_back(prop);
|
||||
}
|
||||
}
|
||||
hsa_status_t rocm_hsa_amd_memory_pool_callback(
|
||||
hsa_amd_memory_pool_t memory_pool, void* data) {
|
||||
hsa_amd_memory_pool_global_flag_t pool_flag{};
|
||||
@@ -108,6 +123,8 @@ int rocm_init() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
device_properties_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user