Add new function to set max threads for workgroup

Resolves: NEO-4116

Change-Id: I8b9faf582c42edcb6f616a2f4662200d0d5b73d3
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
Katarzyna Cencelewska
2020-01-17 20:45:48 +01:00
committed by sys_ocldev
parent 4b2b1acbfd
commit 6ffbf55e43
5 changed files with 18 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -45,4 +45,8 @@ uint32_t HwHelper::getMaxThreadsForVfe(const HardwareInfo &hwInfo) {
return hwInfo.gtSystemInfo.EUCount * threadsPerEU;
}
uint32_t HwHelper::getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const {
uint32_t numThreadsPerEU = hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount;
return maxNumEUsPerSubSlice * numThreadsPerEU;
}
} // namespace NEO