From 1fafd44af5070fba7d0ed7544539fba9564888fa Mon Sep 17 00:00:00 2001 From: Maciej Bielski Date: Mon, 2 Dec 2024 16:47:42 +0000 Subject: [PATCH] refactor: use level-specific name for CacheInfo instances Related-To: NEO-12837 Signed-off-by: Maciej Bielski --- .../linux/cache_reservation_impl_prelim.cpp | 18 +++++------ .../linux/cache_reservation_impl_prelim.h | 4 +-- .../test_cache_reservation_impl_prelim.cpp | 30 +++++++++---------- .../linux/cl_mem_cache_clos_tests_xe_hpc.cpp | 2 +- .../os_interface/linux/drm_allocation.cpp | 4 +-- shared/source/os_interface/linux/drm_neo.cpp | 22 +++++++------- shared/source/os_interface/linux/drm_neo.h | 6 ++-- shared/test/common/libult/linux/drm_mock.h | 2 +- .../test/common/libult/linux/drm_query_mock.h | 2 +- .../linux/device_command_stream_fixture.h | 2 +- .../device_command_stream_fixture_prelim.h | 2 +- .../os_interface/linux/drm_mock_extended.cpp | 2 +- .../os_interface/linux/drm_mock_extended.h | 2 +- .../linux/drm_cache_info_tests.cpp | 6 ++-- .../linux/drm_memory_manager_tests.cpp | 10 +++---- ...m_memory_operations_handler_bind_tests.cpp | 2 +- 16 files changed, 59 insertions(+), 57 deletions(-) diff --git a/level_zero/core/source/cache/linux/cache_reservation_impl_prelim.cpp b/level_zero/core/source/cache/linux/cache_reservation_impl_prelim.cpp index 3ec531bfdd..0e01df16df 100644 --- a/level_zero/core/source/cache/linux/cache_reservation_impl_prelim.cpp +++ b/level_zero/core/source/cache/linux/cache_reservation_impl_prelim.cpp @@ -24,12 +24,12 @@ std::unique_ptr CacheReservation::create(Device &device) { bool CacheReservationImpl::reserveCache(size_t cacheLevel, size_t cacheReservationSize) { auto drm = device.getOsInterface().getDriverModel()->as(); - auto cacheInfo = drm->getCacheInfo(); + auto cacheInfo = drm->getL3CacheInfo(); if (cacheReservationSize == 0) { - cacheInfo->freeCacheRegion(this->reservedCacheRegion); - this->reservedCacheRegion = NEO::CacheRegion::none; - this->reservedCacheSize = 0; + cacheInfo->freeCacheRegion(this->reservedL3CacheRegion); + this->reservedL3CacheRegion = NEO::CacheRegion::none; + this->reservedL3CacheSize = 0; return true; } @@ -38,8 +38,8 @@ bool CacheReservationImpl::reserveCache(size_t cacheLevel, size_t cacheReservati return false; } - this->reservedCacheRegion = cacheRegion; - this->reservedCacheSize = cacheReservationSize; + this->reservedL3CacheRegion = cacheRegion; + this->reservedL3CacheSize = cacheReservationSize; return true; } @@ -49,8 +49,8 @@ bool CacheReservationImpl::setCacheAdvice(void *ptr, [[maybe_unused]] size_t reg size_t cacheRegionSize = 0; if (cacheRegion == ze_cache_ext_region_t::ZE_CACHE_EXT_REGION_ZE_CACHE_RESERVE_REGION) { - cacheRegionIdx = this->reservedCacheRegion; - cacheRegionSize = this->reservedCacheSize; + cacheRegionIdx = this->reservedL3CacheRegion; + cacheRegionSize = this->reservedL3CacheSize; } auto allocData = device.getDriverHandle()->getSvmAllocsManager()->getSVMAlloc(ptr); @@ -69,7 +69,7 @@ bool CacheReservationImpl::setCacheAdvice(void *ptr, [[maybe_unused]] size_t reg size_t CacheReservationImpl::getMaxCacheReservationSize() { auto drm = device.getOsInterface().getDriverModel()->as(); - auto cacheInfo = drm->getCacheInfo(); + auto cacheInfo = drm->getL3CacheInfo(); return cacheInfo->getMaxReservationCacheSize(); } diff --git a/level_zero/core/source/cache/linux/cache_reservation_impl_prelim.h b/level_zero/core/source/cache/linux/cache_reservation_impl_prelim.h index 839a97bdaf..34cb83ceaf 100644 --- a/level_zero/core/source/cache/linux/cache_reservation_impl_prelim.h +++ b/level_zero/core/source/cache/linux/cache_reservation_impl_prelim.h @@ -24,8 +24,8 @@ class CacheReservationImpl : public CacheReservation { protected: Device &device; - NEO::CacheRegion reservedCacheRegion = NEO::CacheRegion::none; - size_t reservedCacheSize = 0; + NEO::CacheRegion reservedL3CacheRegion = NEO::CacheRegion::none; + size_t reservedL3CacheSize = 0; }; } // namespace L0 diff --git a/level_zero/core/test/unit_tests/sources/cache/linux/test_cache_reservation_impl_prelim.cpp b/level_zero/core/test/unit_tests/sources/cache/linux/test_cache_reservation_impl_prelim.cpp index 70c45d908e..bdf2aba161 100644 --- a/level_zero/core/test/unit_tests/sources/cache/linux/test_cache_reservation_impl_prelim.cpp +++ b/level_zero/core/test/unit_tests/sources/cache/linux/test_cache_reservation_impl_prelim.cpp @@ -33,8 +33,8 @@ namespace ult { class MockCacheReservationImpl : public CacheReservationImpl { public: - using CacheReservationImpl::reservedCacheRegion; - using CacheReservationImpl::reservedCacheSize; + using CacheReservationImpl::reservedL3CacheRegion; + using CacheReservationImpl::reservedL3CacheSize; }; class CacheReservationFixture : public DeviceFixture { @@ -49,7 +49,7 @@ class CacheReservationFixture : public DeviceFixture { mockDrm->ioctlHelper = IoctlHelper::getI915Helper(productFamily, "2.0", *mockDrm); mockDrm->ioctlHelper->initialize(); - mockDrm->cacheInfo.reset(new MockCacheInfo(*mockDrm->ioctlHelper, 1024, 1, 32)); + mockDrm->l3CacheInfo.reset(new MockCacheInfo(*mockDrm->ioctlHelper, 1024, 1, 32)); rootDeviceEnvironment.osInterface.reset(new NEO::OSInterface); rootDeviceEnvironment.osInterface->setDriverModel(std::unique_ptr(mockDrm)); rootDeviceEnvironment.initGmm(); @@ -75,34 +75,34 @@ HWTEST2_F(CacheReservationTest, GivenCacheReservationSupportedWhenCallingReserve EXPECT_TRUE(result); auto cacheImpl = static_cast(cache); - EXPECT_EQ(CacheRegion::none, cacheImpl->reservedCacheRegion); - EXPECT_EQ(0u, cacheImpl->reservedCacheSize); + EXPECT_EQ(CacheRegion::none, cacheImpl->reservedL3CacheRegion); + EXPECT_EQ(0u, cacheImpl->reservedL3CacheSize); } HWTEST2_F(CacheReservationTest, GivenCacheReservationSupportedWhenCallingReserveCacheWithInvalidSizeThenDontReserveCacheRegion, IsCacheReservationSupported) { size_t cacheLevel = 3; size_t cacheReservationSize = 2048; - ASSERT_GT(cacheReservationSize, mockDrm->getCacheInfo()->getMaxReservationCacheSize()); + ASSERT_GT(cacheReservationSize, mockDrm->getL3CacheInfo()->getMaxReservationCacheSize()); auto result = cache->reserveCache(cacheLevel, cacheReservationSize); EXPECT_FALSE(result); auto cacheImpl = static_cast(cache); - EXPECT_EQ(CacheRegion::none, cacheImpl->reservedCacheRegion); - EXPECT_EQ(0u, cacheImpl->reservedCacheSize); + EXPECT_EQ(CacheRegion::none, cacheImpl->reservedL3CacheRegion); + EXPECT_EQ(0u, cacheImpl->reservedL3CacheSize); } HWTEST2_F(CacheReservationTest, GivenCacheReservationSupportedWhenCallingReserveCacheWithValidSizeThenReserveCacheRegionWithGivenSize, IsCacheReservationSupported) { size_t cacheLevel = 3; size_t cacheReservationSize = 1024; - ASSERT_LE(cacheReservationSize, mockDrm->getCacheInfo()->getMaxReservationCacheSize()); + ASSERT_LE(cacheReservationSize, mockDrm->getL3CacheInfo()->getMaxReservationCacheSize()); auto result = cache->reserveCache(cacheLevel, cacheReservationSize); EXPECT_TRUE(result); auto cacheImpl = static_cast(cache); - EXPECT_NE(CacheRegion::none, cacheImpl->reservedCacheRegion); - EXPECT_EQ(1024u, cacheImpl->reservedCacheSize); + EXPECT_NE(CacheRegion::none, cacheImpl->reservedL3CacheRegion); + EXPECT_EQ(1024u, cacheImpl->reservedL3CacheSize); } HWTEST2_F(CacheReservationTest, GivenCacheReservationSupportedWhenCallingSetCacheAdviceWithInvalidPointerThenReturnFalse, IsCacheReservationSupported) { @@ -121,8 +121,8 @@ HWTEST2_F(CacheReservationTest, GivenCacheReservationSupportedWhenCallingSetCach HWTEST2_F(CacheReservationTest, GivenCacheReservationSupportedWhenCallingSetCacheAdviceOnReservedRegionWithoutPriorCacheReservationThenReturnFalse, IsCacheReservationSupported) { auto cacheImpl = static_cast(cache); - EXPECT_EQ(CacheRegion::none, cacheImpl->reservedCacheRegion); - EXPECT_EQ(0u, cacheImpl->reservedCacheSize); + EXPECT_EQ(CacheRegion::none, cacheImpl->reservedL3CacheRegion); + EXPECT_EQ(0u, cacheImpl->reservedL3CacheSize); uint64_t gpuAddress = 0x1200; void *ptr = reinterpret_cast(gpuAddress); @@ -180,7 +180,7 @@ HWTEST2_F(CacheReservationTest, GivenCacheReservationSupportedWhenCallingSetCach for (auto bo : drmAllocation->getBOs()) { if (bo != nullptr) { EXPECT_NE(CacheRegion::defaultRegion, bo->peekCacheRegion()); - EXPECT_EQ(static_cast(cache)->reservedCacheRegion, bo->peekCacheRegion()); + EXPECT_EQ(static_cast(cache)->reservedL3CacheRegion, bo->peekCacheRegion()); } } } @@ -226,7 +226,7 @@ HWTEST2_F(CacheReservationTest, GivenCacheReservationSupportedWhenCallingSetCach } HWTEST2_F(CacheReservationTest, GivenCacheReservationCreatedWhenCallingGetMaxCacheReservationSizeThenReturnZero, IsCacheReservationSupported) { - EXPECT_EQ(mockDrm->getCacheInfo()->getMaxReservationCacheSize(), cache->getMaxCacheReservationSize()); + EXPECT_EQ(mockDrm->getL3CacheInfo()->getMaxReservationCacheSize(), cache->getMaxCacheReservationSize()); } } // namespace ult diff --git a/opencl/test/unit_test/os_interface/linux/cl_mem_cache_clos_tests_xe_hpc.cpp b/opencl/test/unit_test/os_interface/linux/cl_mem_cache_clos_tests_xe_hpc.cpp index c26447612c..b66caea99e 100644 --- a/opencl/test/unit_test/os_interface/linux/cl_mem_cache_clos_tests_xe_hpc.cpp +++ b/opencl/test/unit_test/os_interface/linux/cl_mem_cache_clos_tests_xe_hpc.cpp @@ -32,7 +32,7 @@ struct BuffersWithClMemCacheClosTests : public DrmMemoryManagerLocalMemoryPrelim auto memoryInfo = new MockExtendedMemoryInfo(*mock); mock->memoryInfo.reset(memoryInfo); - mock->cacheInfo.reset(new MockCacheInfo(*mock->getIoctlHelper(), 1024, 2, 32)); + mock->l3CacheInfo.reset(new MockCacheInfo(*mock->getIoctlHelper(), 1024, 2, 32)); auto &multiTileArchInfo = executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->getMutableHardwareInfo()->gtSystemInfo.MultiTileArchInfo; multiTileArchInfo.TileCount = (memoryInfo->getDrmRegionInfos().size() - 1); diff --git a/shared/source/os_interface/linux/drm_allocation.cpp b/shared/source/os_interface/linux/drm_allocation.cpp index 23cb6a46db..ca748db46b 100644 --- a/shared/source/os_interface/linux/drm_allocation.cpp +++ b/shared/source/os_interface/linux/drm_allocation.cpp @@ -161,7 +161,7 @@ bool DrmAllocation::setCacheRegion(Drm *drm, CacheRegion regionIndex) { return true; } - auto cacheInfo = drm->getCacheInfo(); + auto cacheInfo = drm->getL3CacheInfo(); if (cacheInfo == nullptr) { return false; } @@ -175,7 +175,7 @@ bool DrmAllocation::setCacheRegion(Drm *drm, CacheRegion regionIndex) { } bool DrmAllocation::setCacheAdvice(Drm *drm, size_t regionSize, CacheRegion regionIndex, bool isSystemMemoryPool) { - if (!drm->getCacheInfo()->getCacheRegion(regionSize, regionIndex)) { + if (!drm->getL3CacheInfo()->getCacheRegion(regionSize, regionIndex)) { return false; } diff --git a/shared/source/os_interface/linux/drm_neo.cpp b/shared/source/os_interface/linux/drm_neo.cpp index e7171b23c6..23fb5c5f1b 100644 --- a/shared/source/os_interface/linux/drm_neo.cpp +++ b/shared/source/os_interface/linux/drm_neo.cpp @@ -1017,21 +1017,23 @@ void Drm::setupCacheInfo(const HardwareInfo &hwInfo) { auto &productHelper = rootDeviceEnvironment.getHelper(); if (debugManager.flags.ClosEnabled.get() == 0 || productHelper.getNumCacheRegions() == 0) { - this->cacheInfo.reset(new CacheInfo{*ioctlHelper, 0, 0, 0}); + this->l3CacheInfo.reset(new CacheInfo{*ioctlHelper, 0, 0, 0}); return; } - const GT_SYSTEM_INFO *gtSysInfo = &hwInfo.gtSystemInfo; + auto allocateL3CacheInfo{[&productHelper, &hwInfo, &ioctlHelper = *(this->ioctlHelper)]() { + constexpr uint16_t maxNumWays = 32; + constexpr uint16_t globalReservationLimit = 16; + constexpr uint16_t clientReservationLimit = 8; + constexpr uint16_t maxReservationNumWays = std::min(globalReservationLimit, clientReservationLimit); + const size_t totalCacheSize = hwInfo.gtSystemInfo.L3CacheSizeInKb * MemoryConstants::kiloByte; + const size_t maxReservationCacheSize = (totalCacheSize * maxReservationNumWays) / maxNumWays; + const uint32_t maxReservationNumCacheRegions = productHelper.getNumCacheRegions() - 1; - constexpr uint16_t maxNumWays = 32; - constexpr uint16_t globalReservationLimit = 16; - constexpr uint16_t clientReservationLimit = 8; - constexpr uint16_t maxReservationNumWays = std::min(globalReservationLimit, clientReservationLimit); - const size_t totalCacheSize = gtSysInfo->L3CacheSizeInKb * MemoryConstants::kiloByte; - const size_t maxReservationCacheSize = (totalCacheSize * maxReservationNumWays) / maxNumWays; - const uint32_t maxReservationNumCacheRegions = productHelper.getNumCacheRegions() - 1; + return new CacheInfo(ioctlHelper, maxReservationCacheSize, maxReservationNumCacheRegions, maxReservationNumWays); + }}; - this->cacheInfo.reset(new CacheInfo(*ioctlHelper, maxReservationCacheSize, maxReservationNumCacheRegions, maxReservationNumWays)); + this->l3CacheInfo.reset(allocateL3CacheInfo()); } void Drm::getPrelimVersion(std::string &prelimVersion) { diff --git a/shared/source/os_interface/linux/drm_neo.h b/shared/source/os_interface/linux/drm_neo.h index 789cf28d3b..7b5ed8cef9 100644 --- a/shared/source/os_interface/linux/drm_neo.h +++ b/shared/source/os_interface/linux/drm_neo.h @@ -188,8 +188,8 @@ class Drm : public DriverModel { return systemInfo.get(); } - CacheInfo *getCacheInfo() const { - return cacheInfo.get(); + CacheInfo *getL3CacheInfo() const { + return l3CacheInfo.get(); } MemoryInfo *getMemoryInfo() const { @@ -331,7 +331,7 @@ class Drm : public DriverModel { std::unique_ptr hwDeviceId; std::unique_ptr ioctlHelper; std::unique_ptr systemInfo; - std::unique_ptr cacheInfo; + std::unique_ptr l3CacheInfo; std::unique_ptr engineInfo; std::unique_ptr memoryInfo; diff --git a/shared/test/common/libult/linux/drm_mock.h b/shared/test/common/libult/linux/drm_mock.h index 13957c3a48..09ae73835d 100644 --- a/shared/test/common/libult/linux/drm_mock.h +++ b/shared/test/common/libult/linux/drm_mock.h @@ -26,7 +26,6 @@ class DrmMock : public Drm { public: using Drm::adapterBDF; using Drm::bindAvailable; - using Drm::cacheInfo; using Drm::checkQueueSliceSupport; using Drm::chunkingAvailable; using Drm::chunkingMode; @@ -39,6 +38,7 @@ class DrmMock : public Drm { using Drm::generateUUID; using Drm::getQueueSliceCount; using Drm::ioctlHelper; + using Drm::l3CacheInfo; using Drm::memoryInfo; using Drm::memoryInfoQueried; using Drm::minimalChunkingSize; diff --git a/shared/test/common/libult/linux/drm_query_mock.h b/shared/test/common/libult/linux/drm_query_mock.h index 92a2c0e9ee..b176ba39f1 100644 --- a/shared/test/common/libult/linux/drm_query_mock.h +++ b/shared/test/common/libult/linux/drm_query_mock.h @@ -27,7 +27,7 @@ class DrmQueryMock : public DrmMock { DrmMockPrelimContext context{ nullptr, rootDeviceEnvironment, - getCacheInfo(), + getL3CacheInfo(), failRetTopology, supportedCopyEnginesMask, contextDebugSupported, diff --git a/shared/test/common/os_interface/linux/device_command_stream_fixture.h b/shared/test/common/os_interface/linux/device_command_stream_fixture.h index 1214deba53..24a8b358b8 100644 --- a/shared/test/common/os_interface/linux/device_command_stream_fixture.h +++ b/shared/test/common/os_interface/linux/device_command_stream_fixture.h @@ -104,11 +104,11 @@ struct DrmMockCustom : public Drm { static std::unique_ptr create(std::unique_ptr &&hwDeviceId, RootDeviceEnvironment &rootDeviceEnvironment); using Drm::bindAvailable; - using Drm::cacheInfo; using Drm::checkToDisableScratchPage; using Drm::completionFenceSupported; using Drm::disableScratch; using Drm::ioctlHelper; + using Drm::l3CacheInfo; using Drm::memoryInfo; using Drm::pageFaultSupported; using Drm::queryTopology; diff --git a/shared/test/common/os_interface/linux/device_command_stream_fixture_prelim.h b/shared/test/common/os_interface/linux/device_command_stream_fixture_prelim.h index 60be221543..e866a9ddc6 100644 --- a/shared/test/common/os_interface/linux/device_command_stream_fixture_prelim.h +++ b/shared/test/common/os_interface/linux/device_command_stream_fixture_prelim.h @@ -12,8 +12,8 @@ #include "shared/test/common/os_interface/linux/device_command_stream_fixture_context.h" struct DrmMockCustomPrelim : public DrmMockCustom { - using Drm::cacheInfo; using Drm::ioctlHelper; + using Drm::l3CacheInfo; using Drm::memoryInfo; static auto create(RootDeviceEnvironment &rootDeviceEnvironment) { diff --git a/shared/test/common/os_interface/linux/drm_mock_extended.cpp b/shared/test/common/os_interface/linux/drm_mock_extended.cpp index 86ae1137d6..5fa8f69f4d 100644 --- a/shared/test/common/os_interface/linux/drm_mock_extended.cpp +++ b/shared/test/common/os_interface/linux/drm_mock_extended.cpp @@ -124,7 +124,7 @@ int DrmMockExtended::handleRemainingRequests(DrmIoctl request, void *arg) { if (cacheReserveArg->clos_index > closIndex) { return EINVAL; } - auto cacheInfo = this->getCacheInfo(); + auto cacheInfo = this->getL3CacheInfo(); auto maxReservationNumWays = cacheInfo ? cacheInfo->getMaxReservationNumWays() : maxNumWays; if (cacheReserveArg->num_ways > maxReservationNumWays) { return EINVAL; diff --git a/shared/test/common/os_interface/linux/drm_mock_extended.h b/shared/test/common/os_interface/linux/drm_mock_extended.h index b8d17a5038..606a4d431a 100644 --- a/shared/test/common/os_interface/linux/drm_mock_extended.h +++ b/shared/test/common/os_interface/linux/drm_mock_extended.h @@ -25,9 +25,9 @@ using namespace NEO; class DrmMockExtended : public DrmMock { public: - using Drm::cacheInfo; using Drm::engineInfo; using Drm::ioctlHelper; + using Drm::l3CacheInfo; using Drm::memoryInfo; using Drm::pageFaultSupported; using Drm::rootDeviceEnvironment; diff --git a/shared/test/unit_test/os_interface/linux/drm_cache_info_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_cache_info_tests.cpp index 8281d6ad9e..ae2d87f656 100644 --- a/shared/test/unit_test/os_interface/linux/drm_cache_info_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_cache_info_tests.cpp @@ -26,7 +26,7 @@ TEST(DrmCacheInfoTest, givenCacheRegionsExistsWhenCallingSetUpCacheInfoThenCache drm.setupCacheInfo(*defaultHwInfo.get()); - auto cacheInfo = drm.getCacheInfo(); + auto cacheInfo = drm.getL3CacheInfo(); EXPECT_NE(nullptr, cacheInfo); if (productHelper.getNumCacheRegions() == 0) { @@ -56,8 +56,8 @@ TEST(DrmCacheInfoTest, givenDebugFlagSetWhenCallingSetUpCacheInfoThenCacheInfoIs DrmQueryMock drm(*executionEnvironment->rootDeviceEnvironments[0]); drm.setupCacheInfo(*defaultHwInfo.get()); - EXPECT_NE(nullptr, drm.getCacheInfo()); - auto cacheInfo = drm.getCacheInfo(); + EXPECT_NE(nullptr, drm.getL3CacheInfo()); + auto cacheInfo = drm.getL3CacheInfo(); EXPECT_EQ(0u, cacheInfo->getMaxReservationCacheSize()); EXPECT_EQ(0u, cacheInfo->getMaxReservationNumCacheRegions()); diff --git a/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp index 9473680a8d..72ef3c775c 100644 --- a/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp @@ -4916,7 +4916,7 @@ TEST_F(DrmAllocationTests, givenDrmAllocationWhenDefaultCacheInfoIsAvailableThen TEST_F(DrmAllocationTests, givenDrmAllocationWhenCacheRegionIsNotSetThenReturnFalse) { const uint32_t rootDeviceIndex = 0u; DrmMock drm(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]); - drm.cacheInfo.reset(new MockCacheInfo(*drm.getIoctlHelper(), 32 * MemoryConstants::kiloByte, 2, 32)); + drm.l3CacheInfo.reset(new MockCacheInfo(*drm.getIoctlHelper(), 32 * MemoryConstants::kiloByte, 2, 32)); MockDrmAllocation allocation(rootDeviceIndex, AllocationType::buffer, MemoryPool::localMemory); @@ -4927,7 +4927,7 @@ TEST_F(DrmAllocationTests, givenDrmAllocationWhenCacheRegionIsSetSuccessfullyThe const uint32_t rootDeviceIndex = 0u; DrmMock drm(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]); drm.queryAndSetVmBindPatIndexProgrammingSupport(); - drm.cacheInfo.reset(new MockCacheInfo(*drm.getIoctlHelper(), 32 * MemoryConstants::kiloByte, 2, 32)); + drm.l3CacheInfo.reset(new MockCacheInfo(*drm.getIoctlHelper(), 32 * MemoryConstants::kiloByte, 2, 32)); MockDrmAllocation allocation(rootDeviceIndex, AllocationType::buffer, MemoryPool::localMemory); auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); @@ -4944,7 +4944,7 @@ TEST_F(DrmAllocationTests, givenDrmAllocationWhenCacheRegionIsSetSuccessfullyThe const uint32_t rootDeviceIndex = 0u; DrmMock drm(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]); drm.queryAndSetVmBindPatIndexProgrammingSupport(); - drm.cacheInfo.reset(new MockCacheInfo(*drm.getIoctlHelper(), 32 * MemoryConstants::kiloByte, 2, 32)); + drm.l3CacheInfo.reset(new MockCacheInfo(*drm.getIoctlHelper(), 32 * MemoryConstants::kiloByte, 2, 32)); MockBufferObject bo(rootDeviceIndex, &drm, 3, 0, 0, 1); MockDrmAllocation allocation(rootDeviceIndex, AllocationType::buffer, MemoryPool::localMemory); @@ -5100,7 +5100,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmAllocationWithHostPtrWhenItIsCreatedWithCac } mock->ioctlExpected.total = -1; auto drm = static_cast(executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->osInterface->getDriverModel()->as()); - drm->cacheInfo.reset(new MockCacheInfo(*drm->getIoctlHelper(), 32 * MemoryConstants::kiloByte, 2, 32)); + drm->l3CacheInfo.reset(new MockCacheInfo(*drm->getIoctlHelper(), 32 * MemoryConstants::kiloByte, 2, 32)); auto ptr = reinterpret_cast(0x1000); auto size = MemoryConstants::pageSize; @@ -6161,7 +6161,7 @@ TEST_F(DrmMemoryManagerWithLocalMemoryAndExplicitExpectationsTest, givenUAllocat allocData.cacheRegion = 0xFFFF; auto &drm = static_cast(memoryManager->getDrm(0)); - drm.cacheInfo.reset(nullptr); + drm.l3CacheInfo.reset(nullptr); auto allocation = memoryManager->allocatePhysicalLocalDeviceMemory(allocData, status); EXPECT_EQ(nullptr, allocation); diff --git a/shared/test/unit_test/os_interface/linux/drm_memory_operations_handler_bind_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_memory_operations_handler_bind_tests.cpp index 65ee38cb33..29ab80f1ad 100755 --- a/shared/test/unit_test/os_interface/linux/drm_memory_operations_handler_bind_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_memory_operations_handler_bind_tests.cpp @@ -1294,7 +1294,7 @@ TEST_F(DrmMemoryOperationsHandlerBindTest, givenClosEnabledAndAllocationToBeCach auto osContext = memoryManager->createAndRegisterOsContext(csr.get(), EngineDescriptorHelper::getDefaultDescriptor()); csr->setupContext(*osContext); - mock->cacheInfo.reset(new CacheInfo(*mock->getIoctlHelper(), 64 * MemoryConstants::kiloByte, 2, 32)); + mock->l3CacheInfo.reset(new CacheInfo(*mock->getIoctlHelper(), 64 * MemoryConstants::kiloByte, 2, 32)); auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper();