Fix detection of support for cooperative groups (#1932)

Query ROCr to see if we have the proper lower-level support for
cooperative groups -- GWS support through the firmware, driver,
thunk, and ROCr. ROCr does these checks for us, and presents a
query that allows us to see if GWS entries are available for use.
If so, then we have all the lower-level technologies needed, and
we should enable cooperative groups support for HIP.
Этот коммит содержится в:
Joseph Greathouse
2020-03-17 03:31:44 -05:00
коммит произвёл GitHub
родитель bbbb8bf1e6
Коммит 18e6c529bc
+5 -3
Просмотреть файл
@@ -895,9 +895,11 @@ hipError_t ihipDevice_t::initProperties(hipDeviceProp_t* prop) {
prop->integrated = 1;
}
// Enable the cooperative group for gfx9+
prop->cooperativeLaunch = (prop->gcnArch < 900) ? 0 : 1;
prop->cooperativeMultiDeviceLaunch = (prop->gcnArch < 900) ? 0 : 1;
// Enable the cooperative group for GPUs that support all the required features
err = hsa_agent_get_info(_hsaAgent, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_COOPERATIVE_QUEUES,
&prop->cooperativeLaunch);
DeviceErrorCheck(err);
prop->cooperativeMultiDeviceLaunch = prop->cooperativeLaunch;
prop->cooperativeMultiDeviceUnmatchedFunc = prop->cooperativeMultiDeviceLaunch;
prop->cooperativeMultiDeviceUnmatchedGridDim = prop->cooperativeMultiDeviceLaunch;