mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 18:25:05 +08:00
Simplify Preemption interface and get device preemption once
Change-Id: Iaab9b9b60a71651125df27dece1a68e9c9435143 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
a0cbc21919
commit
7781650586
@@ -214,13 +214,15 @@ HWTEST_F(EnqueueHandlerTest, GivenCommandStreamWithoutKernelAndZeroSurfacesWhenE
|
||||
std::unique_ptr<MockCommandQueueWithCacheFlush<FamilyType>> mockCmdQ(new MockCommandQueueWithCacheFlush<FamilyType>(context, pDevice, 0));
|
||||
|
||||
mockCmdQ->commandRequireCacheFlush = true;
|
||||
mockCmdQ->template enqueueHandler<CL_COMMAND_MARKER>(nullptr, 0, false, nullptr, 0, nullptr, nullptr);
|
||||
MultiDispatchInfo multiDispatch;
|
||||
mockCmdQ->template enqueueHandler<CL_COMMAND_MARKER>(nullptr, 0, false, multiDispatch, 0, nullptr, nullptr);
|
||||
|
||||
auto requiredCmdStreamSize = alignUp(PipeControlHelper<FamilyType>::getSizeForPipeControlWithPostSyncOperation(pDevice->getHardwareInfo()),
|
||||
MemoryConstants::cacheLineSize);
|
||||
|
||||
EXPECT_EQ(mockCmdQ->getCS(0).getUsed(), requiredCmdStreamSize);
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, givenTimestampPacketWriteEnabledAndCommandWithCacheFlushWhenEnqueueingHandlerThenObtainNewStamp) {
|
||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
csr.timestampPacketWriteEnabled = true;
|
||||
@@ -232,7 +234,8 @@ HWTEST_F(EnqueueHandlerTest, givenTimestampPacketWriteEnabledAndCommandWithCache
|
||||
|
||||
cl_event event;
|
||||
|
||||
mockCmdQ->template enqueueHandler<CL_COMMAND_MARKER>(nullptr, 0, false, nullptr, 0, nullptr, &event);
|
||||
MultiDispatchInfo multiDispatch;
|
||||
mockCmdQ->template enqueueHandler<CL_COMMAND_MARKER>(nullptr, 0, false, multiDispatch, 0, nullptr, &event);
|
||||
auto node1 = mockCmdQ->timestampPacketContainer->peekNodes().at(0);
|
||||
EXPECT_NE(nullptr, node1);
|
||||
clReleaseEvent(event);
|
||||
@@ -248,7 +251,8 @@ HWTEST_F(EnqueueHandlerTest, givenTimestampPacketWriteDisabledAndCommandWithCach
|
||||
|
||||
cl_event event;
|
||||
|
||||
mockCmdQ->template enqueueHandler<CL_COMMAND_MARKER>(nullptr, 0, false, nullptr, 0, nullptr, &event);
|
||||
MultiDispatchInfo multiDispatch;
|
||||
mockCmdQ->template enqueueHandler<CL_COMMAND_MARKER>(nullptr, 0, false, multiDispatch, 0, nullptr, &event);
|
||||
auto container = mockCmdQ->timestampPacketContainer.get();
|
||||
EXPECT_EQ(nullptr, container);
|
||||
clReleaseEvent(event);
|
||||
|
||||
Reference in New Issue
Block a user