SWDEV-184709 - support hipLaunchCooperativeKernel()

- Enable cooperative groups support, based on ROCr capability

Change-Id: I975bcea0af7865009eaed24454ce71d897ea8fc4


[ROCm/clr commit: 481d526859]
Этот коммит содержится в:
German Andryeyev
2020-04-01 10:07:48 -04:00
родитель 17a69fc6b9
Коммит 8bda935a71
3 изменённых файлов: 16 добавлений и 6 удалений
+12 -2
Просмотреть файл
@@ -639,11 +639,20 @@ bool Device::create(bool sramEccEnabled) {
return false;
}
uint32_t coop_groups = 0;
// Check cooperative groups for HIP only
if (amd::IS_HIP && (HSA_STATUS_SUCCESS !=
hsa_agent_get_info(_bkendDevice,
static_cast<hsa_agent_info_t>(HSA_AMD_AGENT_INFO_COOPERATIVE_QUEUES), &coop_groups))) {
return false;
}
// Create HSA settings
settings_ = new Settings();
roc::Settings* hsaSettings = static_cast<roc::Settings*>(settings_);
if ((hsaSettings == nullptr) ||
!hsaSettings->create((agent_profile_ == HSA_PROFILE_FULL), deviceInfo_.gfxipVersion_)) {
!hsaSettings->create((agent_profile_ == HSA_PROFILE_FULL),
deviceInfo_.gfxipVersion_, coop_groups)) {
return false;
}
@@ -658,7 +667,8 @@ bool Device::create(bool sramEccEnabled) {
uint32_t hsa_bdf_id = 0;
if (HSA_STATUS_SUCCESS !=
hsa_agent_get_info(_bkendDevice, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_BDFID, &hsa_bdf_id)) {
hsa_agent_get_info(_bkendDevice,
static_cast<hsa_agent_info_t>(HSA_AMD_AGENT_INFO_BDFID), &hsa_bdf_id)) {
return false;
}
+3 -3
Просмотреть файл
@@ -89,7 +89,7 @@ Settings::Settings() {
imageBufferWar_ = false;
}
bool Settings::create(bool fullProfile, int gfxipVersion) {
bool Settings::create(bool fullProfile, int gfxipVersion, bool coop_groups) {
customHostAllocator_ = false;
if (fullProfile) {
@@ -134,8 +134,8 @@ bool Settings::create(bool fullProfile, int gfxipVersion) {
// enable subnormals for gfx900 and later
if (gfxipVersion >= 900) {
singleFpDenorm_ = true;
enableCoopGroups_ = true;
enableCoopMultiDeviceGroups_ = true;
enableCoopGroups_ = coop_groups;
enableCoopMultiDeviceGroups_ = coop_groups;
}
} else {
// Also enable AMD double precision extension?
+1 -1
Просмотреть файл
@@ -77,7 +77,7 @@ class Settings : public device::Settings {
Settings();
//! Creates settings
bool create(bool fullProfile, int gfxipVersion);
bool create(bool fullProfile, int gfxipVersion, bool coop_groups = false);
private:
//! Disable copy constructor