Correct CL_DEVICE_MAX_NUM_SUB_GROUPS query

Change-Id: Ia7b9b041774513fdbfa2df9d1ad7c6d9dd60929f
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-09-11 10:54:46 +02:00
parent a5c556fe11
commit d40510f398
4 changed files with 22 additions and 8 deletions

View File

@ -128,8 +128,17 @@ void ClDevice::initializeCaps() {
deviceInfo.independentForwardProgress = hwInfo.capabilityTable.supportsIndependentForwardProgress;
deviceInfo.ilsWithVersion[0].name[0] = 0;
deviceInfo.ilsWithVersion[0].version = 0;
deviceInfo.maxNumOfSubGroups = 0;
if (ocl21FeaturesEnabled) {
auto simdSizeUsed = DebugManager.flags.UseMaxSimdSizeToDeduceMaxWorkgroupSize.get()
? CommonConstants::maximalSimdSize
: hwHelper.getMinimalSIMDSize();
// calculate a maximum number of subgroups in a workgroup (for the required SIMD size)
deviceInfo.maxNumOfSubGroups = static_cast<uint32_t>(sharedDeviceInfo.maxWorkGroupSize / simdSizeUsed);
if (deviceInfo.independentForwardProgress) {
deviceExtensions += "cl_khr_subgroups ";
}
@ -288,12 +297,6 @@ void ClDevice::initializeCaps() {
deviceInfo.maxComputUnits = systemInfo.EUCount * getNumAvailableDevices();
deviceInfo.maxConstantArgs = 8;
deviceInfo.maxSliceCount = systemInfo.SliceCount;
auto simdSizeUsed = DebugManager.flags.UseMaxSimdSizeToDeduceMaxWorkgroupSize.get()
? CommonConstants::maximalSimdSize
: hwHelper.getMinimalSIMDSize();
// calculate a maximum number of subgroups in a workgroup (for the required SIMD size)
deviceInfo.maxNumOfSubGroups = static_cast<uint32_t>(sharedDeviceInfo.maxWorkGroupSize / simdSizeUsed);
deviceInfo.singleFpConfig |= defaultFpFlags;