Check for context in appendMemoryCopy

Confirm the allocations used in an appendMemoryCopy operation
belong to the same context as the list.

Related-To: LOCI-1996
Resolves: NEO-6162

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2022-06-05 07:46:29 +00:00
committed by Compute-Runtime-Automation
parent 1d6c3b0e04
commit 32bab85f7e
54 changed files with 446 additions and 215 deletions

View File

@@ -476,11 +476,11 @@ TEST_F(KernelArgBufferTest, givenKernelExecInfoWithIndirectStatelessAccessWhenHa
auto deviceProperties = SVMAllocsManager::UnifiedMemoryProperties(InternalMemoryType::DEVICE_UNIFIED_MEMORY, mockKernel.getContext().getRootDeviceIndices(), mockKernel.getContext().getDeviceBitfields());
deviceProperties.device = &pClDevice->getDevice();
auto unifiedDeviceMemoryAllocation = svmAllocationsManager->createUnifiedMemoryAllocation(4096u, deviceProperties);
auto unifiedDeviceMemoryAllocation = svmAllocationsManager->createUnifiedMemoryAllocation(4096u, deviceProperties, nullptr);
EXPECT_FALSE(mockKernel.hasIndirectStatelessAccessToHostMemory());
auto hostProperties = SVMAllocsManager::UnifiedMemoryProperties(InternalMemoryType::HOST_UNIFIED_MEMORY, mockKernel.getContext().getRootDeviceIndices(), mockKernel.getContext().getDeviceBitfields());
auto unifiedHostMemoryAllocation = svmAllocationsManager->createUnifiedMemoryAllocation(4096u, hostProperties);
auto unifiedHostMemoryAllocation = svmAllocationsManager->createUnifiedMemoryAllocation(4096u, hostProperties, nullptr);
EXPECT_TRUE(mockKernel.hasIndirectStatelessAccessToHostMemory());
svmAllocationsManager->freeSVMAlloc(unifiedDeviceMemoryAllocation);