mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 16:48:45 +08:00
Optimize first access to shared allocations
Change-Id: Ia3ce5f1e448128e7c9dfffb9ad49aaee15bdf948 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com> Related-To: NEO-5059
This commit is contained in:
committed by
sys_ocldev
parent
a28e883691
commit
97ec64d22c
@@ -1858,10 +1858,9 @@ TEST_F(EnqueueSvmTest, givenPageFaultManagerWhenEnqueueMemcpyThenAllocIsDecommit
|
||||
auto memoryManager = context->getMemoryManager();
|
||||
context->memoryManager = mockMemoryManager.get();
|
||||
auto srcSvm = context->getSVMAllocsManager()->createSVMAlloc(pDevice->getRootDeviceIndex(), 256, {}, pDevice->getDeviceBitfield());
|
||||
mockMemoryManager->getPageFaultManager()->insertAllocation(srcSvm, 256, context->getSVMAllocsManager(), context->getSpecialQueue());
|
||||
mockMemoryManager->getPageFaultManager()->insertAllocation(ptrSVM, 256, context->getSVMAllocsManager(), context->getSpecialQueue());
|
||||
mockMemoryManager->getPageFaultManager()->insertAllocation(srcSvm, 256, context->getSVMAllocsManager(), context->getSpecialQueue(), {});
|
||||
mockMemoryManager->getPageFaultManager()->insertAllocation(ptrSVM, 256, context->getSVMAllocsManager(), context->getSpecialQueue(), {});
|
||||
EXPECT_EQ(static_cast<MockPageFaultManager *>(mockMemoryManager->getPageFaultManager())->transferToCpuCalled, 0);
|
||||
EXPECT_EQ(static_cast<MockPageFaultManager *>(mockMemoryManager->getPageFaultManager())->protectMemoryCalled, 0);
|
||||
|
||||
this->pCmdQ->enqueueSVMMemcpy(false, ptrSVM, srcSvm, 256, 0, nullptr, nullptr);
|
||||
|
||||
@@ -1880,7 +1879,7 @@ TEST_F(EnqueueSvmTest, givenPageFaultManagerWhenEnqueueMemFillThenAllocIsDecommi
|
||||
mockMemoryManager->pageFaultManager.reset(new MockPageFaultManager());
|
||||
auto memoryManager = context->getMemoryManager();
|
||||
context->memoryManager = mockMemoryManager.get();
|
||||
mockMemoryManager->getPageFaultManager()->insertAllocation(ptrSVM, 256, context->getSVMAllocsManager(), context->getSpecialQueue());
|
||||
mockMemoryManager->getPageFaultManager()->insertAllocation(ptrSVM, 256, context->getSVMAllocsManager(), context->getSpecialQueue(), {});
|
||||
EXPECT_EQ(static_cast<MockPageFaultManager *>(mockMemoryManager->getPageFaultManager())->transferToCpuCalled, 0);
|
||||
EXPECT_EQ(static_cast<MockPageFaultManager *>(mockMemoryManager->getPageFaultManager())->protectMemoryCalled, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user