mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
refactor: unify calculating max group size between OCL and L0
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0bf8e8727e
commit
373ef608bc
@@ -2203,13 +2203,10 @@ bool Kernel::areMultipleSubDevicesInContext() const {
|
||||
|
||||
void Kernel::reconfigureKernel() {
|
||||
const auto &kernelDescriptor = kernelInfo.kernelDescriptor;
|
||||
if (kernelDescriptor.kernelAttributes.numGrfRequired == GrfConfig::largeGrfNumber &&
|
||||
kernelDescriptor.kernelAttributes.simdSize != 32) {
|
||||
this->maxKernelWorkGroupSize >>= 1;
|
||||
}
|
||||
const auto &gfxCoreHelper = this->getGfxCoreHelper();
|
||||
auto maxWorkGroupSize = gfxCoreHelper.calculateMaxWorkGroupSize(kernelDescriptor, this->maxKernelWorkGroupSize);
|
||||
bool isLocalIdsGeneratedByHw = false; // if local ids generated by runtime then more work groups available
|
||||
auto maxWorkGroupSize = static_cast<uint32_t>(kernelInfo.getMaxRequiredWorkGroupSize(getMaxKernelWorkGroupSize()));
|
||||
maxWorkGroupSize = static_cast<uint32_t>(kernelInfo.getMaxRequiredWorkGroupSize(maxWorkGroupSize));
|
||||
|
||||
this->maxKernelWorkGroupSize = gfxCoreHelper.adjustMaxWorkGroupSize(kernelDescriptor.kernelAttributes.numGrfRequired, kernelDescriptor.kernelAttributes.simdSize, isLocalIdsGeneratedByHw, maxWorkGroupSize);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user