mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 15:03:02 +08:00
fix: device usm alloc reuse
Do not put into usm reuse if is internal. Set new isInternalAllocation flag for globals allocations. Use actual size on device for tracking memory usage. Related-To: NEO-6893 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2c2ff5e369
commit
7cb1819b22
@@ -90,7 +90,9 @@ TEST(AllocateGlobalSurfaceTest, GivenSvmAllocsManagerWhenGlobalsAreExportedThenM
|
||||
EXPECT_EQ(0, memcmp(alloc->getUnderlyingBuffer(), initData.data(), initData.size()));
|
||||
ASSERT_NE(nullptr, svmAllocsManager.getSVMAlloc(reinterpret_cast<void *>(static_cast<uintptr_t>(alloc->getGpuAddress()))));
|
||||
EXPECT_TRUE(alloc->isMemObjectsAllocationWithWritableFlags());
|
||||
EXPECT_EQ(InternalMemoryType::deviceUnifiedMemory, svmAllocsManager.getSVMAlloc(reinterpret_cast<void *>(alloc->getGpuAddress()))->memoryType);
|
||||
auto svmData = svmAllocsManager.getSVMAlloc(reinterpret_cast<void *>(alloc->getGpuAddress()));
|
||||
EXPECT_EQ(InternalMemoryType::deviceUnifiedMemory, svmData->memoryType);
|
||||
EXPECT_TRUE(svmData->isInternalAllocation);
|
||||
EXPECT_EQ(AllocationType::constantSurface, alloc->getAllocationType());
|
||||
EXPECT_FALSE(alloc->getDefaultGmm()->resourceParams.Flags.Info.NotLockable);
|
||||
EXPECT_TRUE(svmAllocsManager.requestedZeroedOutAllocation);
|
||||
|
||||
Reference in New Issue
Block a user