mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 08:07:19 +08:00
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:
committed by
Compute-Runtime-Automation
parent
1da7f12934
commit
df9fa343d1
@@ -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),
|
||||
¶mValue,
|
||||
¶mValueSizeRet);
|
||||
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user