mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Queue stall mode for RelaxedOrdering
Related-To: NEO-7458 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
bb308c04ed
commit
bc619fcbec
@ -227,6 +227,16 @@ HWTEST_TEMPLATED_F(BlitAuxTranslationTests, whenFlushTagUpdateThenMiFlushDwIsFlu
|
||||
EXPECT_NE(cmdFound, cmdListBcs.end());
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BlitAuxTranslationTests, whenFlushTagUpdateThenSetStallingCmdsFlag) {
|
||||
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(bcsCsr);
|
||||
|
||||
ultCsr->recordFlusheBatchBuffer = true;
|
||||
|
||||
EXPECT_EQ(SubmissionStatus::SUCCESS, bcsCsr->flushTagUpdate());
|
||||
|
||||
EXPECT_TRUE(ultCsr->latestFlushedBatchBuffer.hasStallingCmds);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BlitAuxTranslationTests, givenBlitTranslationWhenConstructingCommandBufferThenSynchronizeBcsOutput) {
|
||||
using XY_COPY_BLT = typename FamilyType::XY_COPY_BLT;
|
||||
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
|
||||
@ -1412,7 +1422,7 @@ HWTEST_TEMPLATED_F(BlitEnqueueTaskCountTests, givenMarkerThatFollowsCopyOperatio
|
||||
|
||||
auto offset = mockCmdQueue->getCS(0).getUsed();
|
||||
|
||||
//marker needs to program semaphore
|
||||
// marker needs to program semaphore
|
||||
commandQueue->enqueueMarkerWithWaitList(0, nullptr, &outEvent1);
|
||||
|
||||
auto cmdListQueue = getCmdList<FamilyType>(mockCmdQueue->getCS(0), offset);
|
||||
@ -1475,7 +1485,7 @@ HWTEST_TEMPLATED_F(BlitEnqueueTaskCountTests, givenMarkerThatFollowsCopyOperatio
|
||||
auto ultGpgpuCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(gpgpuCsr);
|
||||
auto ultBcsCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(bcsCsr);
|
||||
|
||||
//make sure we wait for both
|
||||
// make sure we wait for both
|
||||
clWaitForEvents(1, &outEvent1);
|
||||
EXPECT_EQ(ultBcsCsr->latestWaitForCompletionWithTimeoutTaskCount, ultBcsCsr->taskCount);
|
||||
EXPECT_EQ(ultGpgpuCsr->latestWaitForCompletionWithTimeoutTaskCount, ultGpgpuCsr->taskCount);
|
||||
@ -1503,7 +1513,7 @@ HWTEST_TEMPLATED_F(BlitEnqueueTaskCountTests, givenMarkerThatFollowsCopyOperatio
|
||||
auto ultGpgpuCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(gpgpuCsr);
|
||||
auto ultBcsCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(bcsCsr);
|
||||
|
||||
//make sure we wait for both
|
||||
// make sure we wait for both
|
||||
clWaitForEvents(1, &outEvent2);
|
||||
EXPECT_EQ(ultBcsCsr->latestWaitForCompletionWithTimeoutTaskCount, ultBcsCsr->taskCount);
|
||||
EXPECT_EQ(ultGpgpuCsr->latestWaitForCompletionWithTimeoutTaskCount, ultGpgpuCsr->taskCount);
|
||||
|
@ -558,7 +558,8 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, GivenFlushMultipleTimesThenSucc
|
||||
cs.replaceGraphicsAllocation(commandBuffer);
|
||||
CommandStreamReceiverHw<FamilyType>::addBatchBufferEnd(cs, nullptr);
|
||||
EncodeNoop<FamilyType>::alignToCacheLine(cs);
|
||||
BatchBuffer batchBuffer2{cs.getGraphicsAllocation(), 8, 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr, false};
|
||||
BatchBuffer batchBuffer2 = BatchBufferHelper::createDefaultBatchBuffer(cs.getGraphicsAllocation(), &cs, cs.getUsed());
|
||||
batchBuffer.startOffset = 8;
|
||||
csr->flush(batchBuffer2, csr->getResidencyAllocations());
|
||||
|
||||
auto allocation = mm->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), MemoryConstants::pageSize});
|
||||
@ -577,7 +578,8 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, GivenFlushMultipleTimesThenSucc
|
||||
cs.replaceGraphicsAllocation(commandBuffer2);
|
||||
CommandStreamReceiverHw<FamilyType>::addBatchBufferEnd(cs, nullptr);
|
||||
EncodeNoop<FamilyType>::alignToCacheLine(cs);
|
||||
BatchBuffer batchBuffer3{cs.getGraphicsAllocation(), 16, 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr, false};
|
||||
BatchBuffer batchBuffer3 = BatchBufferHelper::createDefaultBatchBuffer(cs.getGraphicsAllocation(), &cs, cs.getUsed());
|
||||
batchBuffer.startOffset = 16;
|
||||
csr->flush(batchBuffer3, csr->getResidencyAllocations());
|
||||
csr->makeSurfacePackNonResident(csr->getResidencyAllocations(), true);
|
||||
mm->freeGraphicsMemory(allocation);
|
||||
@ -590,7 +592,8 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, GivenFlushMultipleTimesThenSucc
|
||||
cs.replaceGraphicsAllocation(commandBuffer2);
|
||||
CommandStreamReceiverHw<FamilyType>::addBatchBufferEnd(cs, nullptr);
|
||||
EncodeNoop<FamilyType>::alignToCacheLine(cs);
|
||||
BatchBuffer batchBuffer4{cs.getGraphicsAllocation(), 24, 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr, false};
|
||||
BatchBuffer batchBuffer4 = BatchBufferHelper::createDefaultBatchBuffer(cs.getGraphicsAllocation(), &cs, cs.getUsed());
|
||||
batchBuffer.startOffset = 24;
|
||||
csr->flush(batchBuffer4, csr->getResidencyAllocations());
|
||||
}
|
||||
|
||||
@ -644,7 +647,8 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, GivenNotAlignedWhenFlushingThen
|
||||
|
||||
CommandStreamReceiverHw<FamilyType>::addBatchBufferEnd(cs, nullptr);
|
||||
EncodeNoop<FamilyType>::alignToCacheLine(cs);
|
||||
BatchBuffer batchBuffer{cs.getGraphicsAllocation(), 4, 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr, false};
|
||||
BatchBuffer batchBuffer = BatchBufferHelper::createDefaultBatchBuffer(cs.getGraphicsAllocation(), &cs, cs.getUsed());
|
||||
batchBuffer.startOffset = 4;
|
||||
csr->flush(batchBuffer, csr->getResidencyAllocations());
|
||||
}
|
||||
|
||||
@ -661,7 +665,8 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, GivenCheckDrmFreeWhenFlushingTh
|
||||
csr->makeResident(*allocation);
|
||||
CommandStreamReceiverHw<FamilyType>::addBatchBufferEnd(cs, nullptr);
|
||||
EncodeNoop<FamilyType>::alignToCacheLine(cs);
|
||||
BatchBuffer batchBuffer{cs.getGraphicsAllocation(), 4, 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr, false};
|
||||
BatchBuffer batchBuffer = BatchBufferHelper::createDefaultBatchBuffer(cs.getGraphicsAllocation(), &cs, cs.getUsed());
|
||||
batchBuffer.startOffset = 4;
|
||||
csr->flush(batchBuffer, csr->getResidencyAllocations());
|
||||
csr->makeNonResident(*allocation);
|
||||
mm->freeGraphicsMemory(allocation);
|
||||
|
Reference in New Issue
Block a user