mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +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);
|
||||
|
||||
|
||||
@@ -3287,7 +3287,7 @@ struct KernelLargeGrfTests : Test<ClDeviceFixture> {
|
||||
SPatchExecutionEnvironment executionEnvironment = {};
|
||||
};
|
||||
|
||||
HWTEST_F(KernelLargeGrfTests, GivenLargeGrfAndSimdSizeWhenGettingMaxWorkGroupSizeThenCorrectValueReturned) {
|
||||
HWTEST2_F(KernelLargeGrfTests, GivenLargeGrfAndSimdSizeWhenGettingMaxWorkGroupSizeThenCorrectValueReturned, IsAtLeastXeHpCore) {
|
||||
pKernelInfo->kernelDescriptor.kernelAttributes.simdSize = 16;
|
||||
pKernelInfo->kernelDescriptor.kernelAttributes.crossThreadDataSize = 4;
|
||||
pKernelInfo->kernelDescriptor.payloadMappings.implicitArgs.maxWorkGroupSize = 0;
|
||||
|
||||
Reference in New Issue
Block a user