test: update ults to respect minimal simd

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk 2025-02-10 18:01:10 +00:00 committed by Compute-Runtime-Automation
parent 62b30fa72c
commit b8723458e4
4 changed files with 14 additions and 8 deletions

View File

@ -23,7 +23,9 @@ struct ClCreateKernelsInProgramTests : public ApiTests {
ApiTests::SetUp(); ApiTests::SetUp();
constexpr auto numBits = is32bit ? Elf::EI_CLASS_32 : Elf::EI_CLASS_64; constexpr auto numBits = is32bit ? Elf::EI_CLASS_32 : Elf::EI_CLASS_64;
auto zebinData = std::make_unique<ZebinTestData::ZebinCopyBufferSimdModule<numBits>>(pDevice->getHardwareInfo(), 16); auto simd = std::max(16u, pDevice->getGfxCoreHelper().getMinimalSIMDSize());
auto zebinData = std::make_unique<ZebinTestData::ZebinCopyBufferSimdModule<numBits>>(pDevice->getHardwareInfo(), static_cast<uint8_t>(simd));
const auto &src = zebinData->storage; const auto &src = zebinData->storage;
const auto &binarySize = src.size(); const auto &binarySize = src.size();

View File

@ -1688,7 +1688,8 @@ HWTEST2_F(DeviceGetCapsTest, givenSysInfoWhenDeviceCreatedThenMaxWorkGroupSizeIs
auto &gfxCoreHelper = device->getGfxCoreHelper(); auto &gfxCoreHelper = device->getGfxCoreHelper();
auto minSimd = gfxCoreHelper.getMinimalSIMDSize(); auto minSimd = gfxCoreHelper.getMinimalSIMDSize();
size_t expectedWGSize = (mySysInfo.ThreadCount / mySysInfo.DualSubSliceCount) * minSimd; uint32_t expectedWGSize = (mySysInfo.ThreadCount / mySysInfo.DualSubSliceCount) * minSimd;
expectedWGSize = gfxCoreHelper.overrideMaxWorkGroupSize(expectedWGSize);
EXPECT_EQ(expectedWGSize, device->sharedDeviceInfo.maxWorkGroupSize); EXPECT_EQ(expectedWGSize, device->sharedDeviceInfo.maxWorkGroupSize);
} }

View File

@ -2861,8 +2861,8 @@ TEST_F(KernelCrossThreadTests, WhenKernelIsInitializedThenEnqueuedMaxWorkGroupSi
} }
TEST_F(KernelCrossThreadTests, WhenKernelIsInitializedThenDataParameterSimdSizeIsCorrect) { TEST_F(KernelCrossThreadTests, WhenKernelIsInitializedThenDataParameterSimdSizeIsCorrect) {
pKernelInfo->kernelDescriptor.payloadMappings.implicitArgs.simdSize = 16; pKernelInfo->kernelDescriptor.payloadMappings.implicitArgs.simdSize = pClDevice->getGfxCoreHelper().getMinimalSIMDSize();
pKernelInfo->kernelDescriptor.kernelAttributes.simdSize = 16; pKernelInfo->kernelDescriptor.kernelAttributes.simdSize = pClDevice->getGfxCoreHelper().getMinimalSIMDSize();
MockKernel kernel(program.get(), *pKernelInfo, *pClDevice); MockKernel kernel(program.get(), *pKernelInfo, *pClDevice);
ASSERT_EQ(CL_SUCCESS, kernel.initialize()); ASSERT_EQ(CL_SUCCESS, kernel.initialize());
@ -3821,7 +3821,7 @@ struct KernelLargeGrfTests : Test<ClDeviceFixture> {
}; };
HWTEST2_F(KernelLargeGrfTests, GivenLargeGrfAndSimdSizeWhenGettingMaxWorkGroupSizeThenCorrectValueReturned, IsAtLeastXeHpCore) { HWTEST2_F(KernelLargeGrfTests, GivenLargeGrfAndSimdSizeWhenGettingMaxWorkGroupSizeThenCorrectValueReturned, IsAtLeastXeHpCore) {
pKernelInfo->kernelDescriptor.kernelAttributes.simdSize = 16; pKernelInfo->kernelDescriptor.kernelAttributes.simdSize = pClDevice->getGfxCoreHelper().getMinimalSIMDSize();
pKernelInfo->kernelDescriptor.kernelAttributes.crossThreadDataSize = 4; pKernelInfo->kernelDescriptor.kernelAttributes.crossThreadDataSize = 4;
pKernelInfo->kernelDescriptor.payloadMappings.implicitArgs.maxWorkGroupSize = 0; pKernelInfo->kernelDescriptor.payloadMappings.implicitArgs.maxWorkGroupSize = 0;
{ {
@ -3838,8 +3838,11 @@ HWTEST2_F(KernelLargeGrfTests, GivenLargeGrfAndSimdSizeWhenGettingMaxWorkGroupSi
pKernelInfo->kernelDescriptor.kernelAttributes.numGrfRequired = GrfConfig::largeGrfNumber; pKernelInfo->kernelDescriptor.kernelAttributes.numGrfRequired = GrfConfig::largeGrfNumber;
EXPECT_EQ(CL_SUCCESS, kernel.initialize()); EXPECT_EQ(CL_SUCCESS, kernel.initialize());
EXPECT_EQ(pDevice->getDeviceInfo().maxWorkGroupSize >> 1, *kernel.maxWorkGroupSizeForCrossThreadData); if (pKernelInfo->kernelDescriptor.kernelAttributes.simdSize != 32) {
EXPECT_EQ(pDevice->getDeviceInfo().maxWorkGroupSize >> 1, kernel.maxKernelWorkGroupSize);
EXPECT_EQ(pDevice->getDeviceInfo().maxWorkGroupSize >> 1, *kernel.maxWorkGroupSizeForCrossThreadData);
EXPECT_EQ(pDevice->getDeviceInfo().maxWorkGroupSize >> 1, kernel.maxKernelWorkGroupSize);
}
} }
{ {

View File

@ -92,7 +92,7 @@ TEST_F(PrintfHandlerTests, givenKernelWithImplicitArgsWhenPreparingPrintfHandler
auto pKernelInfo = std::make_unique<MockKernelInfo>(); auto pKernelInfo = std::make_unique<MockKernelInfo>();
pKernelInfo->setPrintfSurface(sizeof(uintptr_t), 0); pKernelInfo->setPrintfSurface(sizeof(uintptr_t), 0);
pKernelInfo->kernelDescriptor.kernelAttributes.simdSize = 16; pKernelInfo->kernelDescriptor.kernelAttributes.simdSize = device->getGfxCoreHelper().getMinimalSIMDSize();
pKernelInfo->kernelDescriptor.kernelAttributes.flags.requiresImplicitArgs = true; pKernelInfo->kernelDescriptor.kernelAttributes.flags.requiresImplicitArgs = true;
MockProgram program{&context, false, toClDeviceVector(*device)}; MockProgram program{&context, false, toClDeviceVector(*device)};