Do not make resident something that is already resident.

Move checks to upper layers.
100ns gain in ZE_AFFINITY_MASK=0.0 PrintDebugSettings=1
./api_overhead_benchmark_l0 --test=ExecuteCommandListImmediate --api=l0
--UseProfiling=0 --CallsCount=1 --MeasureCompletionTime=0
--useBarrierSynchronization=0 --KernelExecutionTime=1 --iterations=1000

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2022-09-20 15:18:18 +00:00
committed by Compute-Runtime-Automation
parent faf8d51f6d
commit bddf8c7dbc
3 changed files with 13 additions and 5 deletions

View File

@ -402,6 +402,8 @@ TEST_F(DrmMemoryOperationsHandlerBindTest, givenMakeBOsResidentFailsThenMakeResi
auto size = 1024u;
BufferObjects bos;
BufferObject mockBo(mock, 3, 1, 0, 1);
bos.push_back(&mockBo);
auto allocation = new MockDrmAllocationBOsResident(0, AllocationType::UNKNOWN, bos, nullptr, 0u, size, MemoryPool::LocalMemory);
auto graphicsAllocation = static_cast<GraphicsAllocation *>(allocation);