mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Disable GEM_WAIT when new residency model available
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
3dbe37c423
commit
8e1e213bcf
@ -730,6 +730,27 @@ TEST(OsAgnosticMemoryManager, givenDefaultMemoryManagerWhenAllocateGraphicsMemor
|
||||
memoryManager.freeGraphicsMemory(imageAllocation);
|
||||
}
|
||||
|
||||
TEST(OsAgnosticMemoryManager, givenDestroyedTagAllocationWhenWaitForCompletiionThenWaitForTaskCountIsNotCalled) {
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
auto memoryManager = new OsAgnosticMemoryManager(executionEnvironment);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(executionEnvironment, 0u, deviceBitfield));
|
||||
executionEnvironment.memoryManager.reset(memoryManager);
|
||||
auto osContext = memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0],
|
||||
deviceBitfield,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false);
|
||||
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{0, MemoryConstants::pageSize});
|
||||
allocation->updateTaskCount(10, osContext->getContextId());
|
||||
|
||||
EXPECT_GT(allocation->getTaskCount(osContext->getContextId()), csr->peekTaskCount());
|
||||
memoryManager->waitForEnginesCompletion(*allocation);
|
||||
|
||||
memoryManager->freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
TEST(OsAgnosticMemoryManager, givenEnabledLocalMemoryWhenAllocateGraphicsMemoryForImageIsCalledThenUseLocalMemoryIsNotSet) {
|
||||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
MockMemoryManager memoryManager(false, true, *executionEnvironment);
|
||||
|
Reference in New Issue
Block a user