Error check total SLM size not only inline

Related-To: NEO-7280
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwolinski
2022-11-18 11:52:23 +00:00
committed by Compute-Runtime-Automation
parent 0b3582a93b
commit f6eb2e753a
4 changed files with 43 additions and 21 deletions

View File

@ -55,7 +55,7 @@ TEST_F(clEnqueueNDRangeKernelTests, GivenKernelWithSlmSizeExceedingLocalMemorySi
auto localMemSize = static_cast<uint32_t>(pDevice->getDevice().getDeviceInfo().localMemSize);
pProgram->mockKernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize = localMemSize - 10u;
pKernel->setTotalSLMSize(localMemSize - 10u);
retVal = clEnqueueNDRangeKernel(
pCommandQueue,
pMultiDeviceKernel,
@ -74,7 +74,7 @@ TEST_F(clEnqueueNDRangeKernelTests, GivenKernelWithSlmSizeExceedingLocalMemorySi
::testing::internal::CaptureStderr();
pProgram->mockKernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize = localMemSize + 10u;
pKernel->setTotalSLMSize(localMemSize + 10u);
retVal = clEnqueueNDRangeKernel(
pCommandQueue,
pMultiDeviceKernel,
@ -89,7 +89,7 @@ TEST_F(clEnqueueNDRangeKernelTests, GivenKernelWithSlmSizeExceedingLocalMemorySi
EXPECT_EQ(CL_OUT_OF_RESOURCES, retVal);
output = testing::internal::GetCapturedStderr();
const auto &slmInlineSize = pProgram->mockKernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize;
const auto &slmInlineSize = pKernel->getSlmTotalSize();
std::string expectedOutput = "Size of SLM (" + std::to_string(slmInlineSize) + ") larger than available (" + std::to_string(localMemSize) + ")\n";
EXPECT_EQ(expectedOutput, output);
}