@@ -1886,7 +1886,7 @@ TEST_F(CommandQueueCreate, givenCommandQueueWhenHandleIndirectAllocationResidenc
1886
1886
auto mockSvmAllocsManager = std::make_unique<SVMAllocsManagerMock>(device->getDriverHandle ()->getMemoryManager ());
1887
1887
reinterpret_cast <WhiteBox<::L0::DriverHandle> *>(device->getDriverHandle ())->svmAllocsManager = mockSvmAllocsManager.get ();
1888
1888
1889
- commandQueue->handleIndirectAllocationResidency ({true , true , true }, lock);
1889
+ commandQueue->handleIndirectAllocationResidency ({true , true , true }, lock, false );
1890
1890
EXPECT_EQ (mockSvmAllocsManager->makeIndirectAllocationsResidentCalledTimes , 1u );
1891
1891
EXPECT_EQ (mockSvmAllocsManager->addInternalAllocationsToResidencyContainerCalledTimes , 0u );
1892
1892
reinterpret_cast <WhiteBox<::L0::DriverHandle> *>(device->getDriverHandle ())->svmAllocsManager = prevSvmAllocsManager;
@@ -1911,7 +1911,7 @@ TEST_F(CommandQueueCreate, givenCommandQueueWhenHandleIndirectAllocationResidenc
1911
1911
auto mockSvmAllocsManager = std::make_unique<SVMAllocsManagerMock>(device->getDriverHandle ()->getMemoryManager ());
1912
1912
reinterpret_cast <WhiteBox<::L0::DriverHandle> *>(device->getDriverHandle ())->svmAllocsManager = mockSvmAllocsManager.get ();
1913
1913
1914
- commandQueue->handleIndirectAllocationResidency ({true , true , true }, lock);
1914
+ commandQueue->handleIndirectAllocationResidency ({true , true , true }, lock, false );
1915
1915
EXPECT_EQ (mockSvmAllocsManager->makeIndirectAllocationsResidentCalledTimes , 0u );
1916
1916
EXPECT_EQ (mockSvmAllocsManager->addInternalAllocationsToResidencyContainerCalledTimes , 1u );
1917
1917
reinterpret_cast <WhiteBox<::L0::DriverHandle> *>(device->getDriverHandle ())->svmAllocsManager = prevSvmAllocsManager;
@@ -1937,7 +1937,7 @@ TEST_F(CommandQueueCreate, givenCommandQueueWhenHandleIndirectAllocationResidenc
1937
1937
auto mockSvmAllocsManager = std::make_unique<SVMAllocsManagerMock>(device->getDriverHandle ()->getMemoryManager ());
1938
1938
reinterpret_cast <WhiteBox<::L0::DriverHandle> *>(device->getDriverHandle ())->svmAllocsManager = mockSvmAllocsManager.get ();
1939
1939
1940
- commandQueue->handleIndirectAllocationResidency ({true , true , true }, lock);
1940
+ commandQueue->handleIndirectAllocationResidency ({true , true , true }, lock, false );
1941
1941
std::thread th ([&] {
1942
1942
EXPECT_FALSE (mockSvmAllocsManager->mtxForIndirectAccess .try_lock ());
1943
1943
});
@@ -1947,30 +1947,5 @@ TEST_F(CommandQueueCreate, givenCommandQueueWhenHandleIndirectAllocationResidenc
1947
1947
commandQueue->destroy ();
1948
1948
}
1949
1949
1950
- TEST_F (CommandQueueCreate, givenCommandQueueWhenHandleIndirectAllocationResidencyCalledAndSubmiPackDisabeldThenResidencyContainerFromCsrIsUsed) {
1951
- DebugManagerStateRestore restore;
1952
- DebugManager.flags .MakeIndirectAllocationsResidentAsPack .set (0 );
1953
- const ze_command_queue_desc_t desc{};
1954
- ze_result_t returnValue;
1955
-
1956
- auto prevSvmAllocsManager = device->getDriverHandle ()->getSvmAllocsManager ();
1957
- auto commandQueue = whiteboxCast (CommandQueue::create (productFamily,
1958
- device,
1959
- neoDevice->getDefaultEngine ().commandStreamReceiver ,
1960
- &desc,
1961
- false ,
1962
- false ,
1963
- returnValue));
1964
- std::unique_lock<std::mutex> lock;
1965
- auto mockSvmAllocsManager = std::make_unique<SVMAllocsManagerMock>(device->getDriverHandle ()->getMemoryManager ());
1966
- reinterpret_cast <WhiteBox<::L0::DriverHandle> *>(device->getDriverHandle ())->svmAllocsManager = mockSvmAllocsManager.get ();
1967
-
1968
- commandQueue->handleIndirectAllocationResidency ({true , true , true }, lock);
1969
- EXPECT_EQ (commandQueue->csr ->getResidencyAllocations ().data (), mockSvmAllocsManager->passedContainer );
1970
- reinterpret_cast <WhiteBox<::L0::DriverHandle> *>(device->getDriverHandle ())->svmAllocsManager = prevSvmAllocsManager;
1971
- lock.unlock ();
1972
- commandQueue->destroy ();
1973
- }
1974
-
1975
1950
} // namespace ult
1976
1951
} // namespace L0
0 commit comments