mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Pass private scratch size to scratch space controller
Related-To: NEO-3190 Change-Id: I6f1e71481679492516d898226de6a1e721896e81 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
2f42f332d8
commit
27f3f8ea8f
@@ -334,6 +334,26 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueKernelTest, givenSecondEnqueueWithTheSameScra
|
||||
EXPECT_EQ(csr.getScratchAllocation(), scratchAlloc);
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, whenEnqueueingKernelThatRequirePrivateScratchThenPrivateScratchIsSetInCommandStreamReceviver) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
csr.getMemoryManager()->setForce32BitAllocations(false);
|
||||
size_t off[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
|
||||
SPatchMediaVFEState mediaVFEstate;
|
||||
uint32_t privateScratchSize = 4096u;
|
||||
|
||||
mediaVFEstate.PerThreadScratchSpace = privateScratchSize;
|
||||
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
mockKernel.kernelInfo.patchInfo.mediaVfeStateSlot1 = &mediaVFEstate;
|
||||
|
||||
pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr);
|
||||
|
||||
EXPECT_EQ(privateScratchSize, csr.requiredPrivateScratchSize);
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenEnqueueWithGlobalWorkSizeWhenZeroValueIsPassedInDimensionThenTheKernelCommandWillTriviallySucceed) {
|
||||
size_t gws[3] = {0, 0, 0};
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
|
||||
Reference in New Issue
Block a user