P4 to Git Change 1826060 by gandryey@gera-hip-lnx on 2019/06/13 15:40:00

SWDEV-184708 - Support hipGetDeviceProperties()
	- Enable coop launch properties for gfx9+ by default
	- GPU_ENABLE_COOP_GROUPS controls the feature

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#339 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#143 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#84 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#128 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.cpp#44 edit
This commit is contained in:
foreman
2019-06-14 04:25:03 -04:00
parent f4024263ff
commit f81a154c54
5 changed files with 21 additions and 6 deletions
+3 -1
View File
@@ -537,7 +537,9 @@ class Settings : public amd::HeapObject {
uint enableWave32Mode_ : 1; //!< Enable Wave32 mode for this device
uint lcWavefrontSize64_ : 1; //!< Enable Wave64 mode for this device
uint enableXNACK_ : 1; //!< Enable XNACK feature
uint reserved_ : 14;
uint enableCoopGroups_ : 1; //!< Enable cooperative groups feature
uint enableCoopMultiDeviceGroups_ : 1; //!< Enable cooperative groups multi device
uint reserved_ : 12;
};
uint value_;
};
+3 -2
View File
@@ -660,8 +660,9 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp,
info_.pcieRevisionId_ = palProp.revisionId;
info_.maxThreadsPerCU_ = info_.wavefrontWidth_ * info_.simdPerCU_ *
palProp.gfxipProperties.shaderCore.numWavefrontsPerSimd;
info_.cooperativeGroups_ = GPU_ENABLE_COOP_GROUPS;
info_.cooperativeMultiDeviceGroups_ = GPU_ENABLE_COOP_GROUPS;
info_.cooperativeGroups_ = settings().enableCoopGroups_;
info_.cooperativeMultiDeviceGroups_ = settings().enableCoopMultiDeviceGroups_;
}
}
@@ -223,6 +223,8 @@ bool Settings::create(const Pal::DeviceProperties& palProp,
case Pal::AsicRevision::Raven:
case Pal::AsicRevision::Raven2:
aiPlus_ = true;
enableCoopGroups_ = true;
enableCoopMultiDeviceGroups_ = true;
// Fall through to VI ...
case Pal::AsicRevision::Carrizo:
case Pal::AsicRevision::Bristol:
@@ -540,6 +542,11 @@ void Settings::override() {
if (!flagIsDefault(GPU_MAX_COMMAND_BUFFERS)) {
maxCmdBuffers_ = GPU_MAX_COMMAND_BUFFERS;
}
if (!flagIsDefault(GPU_ENABLE_COOP_GROUPS)) {
enableCoopGroups_ = GPU_ENABLE_COOP_GROUPS;
enableCoopMultiDeviceGroups_ = GPU_ENABLE_COOP_GROUPS;
}
}
} // namespace pal
+2 -2
View File
@@ -1376,8 +1376,8 @@ bool Device::populateOCLDeviceConstants() {
//TODO: set to true once thread trace support is available
info_.threadTraceEnable_ = false;
info_.pcieDeviceId_ = deviceInfo_.pciDeviceId_;
info_.cooperativeGroups_ = GPU_ENABLE_COOP_GROUPS;
info_.cooperativeMultiDeviceGroups_ = GPU_ENABLE_COOP_GROUPS;
info_.cooperativeGroups_ = settings().enableCoopGroups_;
info_.cooperativeMultiDeviceGroups_ = settings().enableCoopMultiDeviceGroups_;
}
info_.maxPipePacketSize_ = info_.maxMemAllocSize_;
+6 -1
View File
@@ -117,6 +117,8 @@ bool Settings::create(bool fullProfile, int gfxipVersion) {
// enable subnormals for gfx900 and later
if (gfxipVersion >= 900) {
singleFpDenorm_ = true;
enableCoopGroups_ = true;
enableCoopMultiDeviceGroups_ = true;
}
} else {
// Also enable AMD double precision extension?
@@ -180,8 +182,11 @@ void Settings::override() {
break;
}
}
if (!flagIsDefault(GPU_ENABLE_COOP_GROUPS)) {
enableCoopGroups_ = GPU_ENABLE_COOP_GROUPS;
enableCoopMultiDeviceGroups_ = GPU_ENABLE_COOP_GROUPS;
}
}
} // namespace roc
#endif // WITHOUT_GPU_BACKEND