feature: limit max workgroup size to 1k items

Resolves: NEO-11881

Signed-off-by: Damian Tomczak <damian.tomczak@intel.com>
This commit is contained in:
Damian Tomczak
2024-08-23 11:46:01 +00:00
committed by Compute-Runtime-Automation
parent 1da7f12934
commit df9fa343d1
5 changed files with 28 additions and 2 deletions

View File

@@ -74,6 +74,7 @@ TEST_F(ClGetKernelWorkGroupInfoTest, GivenNullDeviceWhenGettingWorkGroupInfoFrom
EXPECT_EQ(CL_INVALID_DEVICE, retVal);
}
TEST_F(ClGetKernelWorkGroupInfoTests, GivenKernelRequiringScratchSpaceForSpillWhenGettingKernelWorkGroupInfoThenCorrectSpillMemSizeIsReturned) {
size_t paramValueSizeRet;
cl_ulong paramValue;
@@ -138,6 +139,23 @@ TEST_F(ClGetKernelWorkGroupInfoTests, givenKernelNotHavingPrivateMemoryAllocatio
EXPECT_EQ(paramValue, 0u);
}
TEST_F(ClGetKernelWorkGroupInfoTests, whenWorkgroupSizeCheckedThenSizeLimitIs1kOrLess) {
size_t paramValueSizeRet = 0;
size_t paramValue = 0;
retVal = clGetKernelWorkGroupInfo(
kernel,
testedClDevice,
CL_KERNEL_WORK_GROUP_SIZE,
sizeof(size_t),
&paramValue,
&paramValueSizeRet);
EXPECT_EQ(retVal, CL_SUCCESS);
EXPECT_EQ(paramValueSizeRet, sizeof(size_t));
EXPECT_LE(paramValue, CommonConstants::maxWorkgroupSize);
}
static cl_kernel_work_group_info paramNames[] = {
CL_KERNEL_WORK_GROUP_SIZE,
CL_KERNEL_COMPILE_WORK_GROUP_SIZE,