diff --git a/opencl/source/sharings/d3d/d3d_texture.cpp b/opencl/source/sharings/d3d/d3d_texture.cpp index ea7a9daaa9..0119590d39 100644 --- a/opencl/source/sharings/d3d/d3d_texture.cpp +++ b/opencl/source/sharings/d3d/d3d_texture.cpp @@ -13,6 +13,7 @@ #include "shared/source/helpers/get_info.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/memory_manager/memory_manager.h" +#include "shared/source/os_interface/hw_info_config.h" #include "opencl/source/cl_device/cl_device.h" #include "opencl/source/context/context.h" @@ -117,8 +118,9 @@ Image *D3DTexture::create2d(Context *context, D3DTexture2d *d3dTexture, cl_ } if (alloc->getDefaultGmm()->unifiedAuxTranslationCapable()) { - alloc->getDefaultGmm()->isCompressionEnabled = hwHelper.isPageTableManagerSupported(*hwInfo) ? memoryManager->mapAuxGpuVA(alloc) - : true; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo->platform.eProductFamily); + alloc->getDefaultGmm()->isCompressionEnabled = hwInfoConfig.isPageTableManagerSupported(*hwInfo) ? memoryManager->mapAuxGpuVA(alloc) + : true; } auto multiGraphicsAllocation = MultiGraphicsAllocation(rootDeviceIndex); multiGraphicsAllocation.addAllocation(alloc); @@ -203,8 +205,9 @@ Image *D3DTexture::create3d(Context *context, D3DTexture3d *d3dTexture, cl_ imgInfo.surfaceFormat = &clSurfaceFormat->surfaceFormat; if (alloc->getDefaultGmm()->unifiedAuxTranslationCapable()) { - alloc->getDefaultGmm()->isCompressionEnabled = hwHelper.isPageTableManagerSupported(*hwInfo) ? memoryManager->mapAuxGpuVA(alloc) - : true; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo->platform.eProductFamily); + alloc->getDefaultGmm()->isCompressionEnabled = hwInfoConfig.isPageTableManagerSupported(*hwInfo) ? memoryManager->mapAuxGpuVA(alloc) + : true; } auto multiGraphicsAllocation = MultiGraphicsAllocation(rootDeviceIndex); multiGraphicsAllocation.addAllocation(alloc); diff --git a/opencl/source/sharings/gl/windows/gl_texture_windows.cpp b/opencl/source/sharings/gl/windows/gl_texture_windows.cpp index 240e9009c5..78d2a487c6 100644 --- a/opencl/source/sharings/gl/windows/gl_texture_windows.cpp +++ b/opencl/source/sharings/gl/windows/gl_texture_windows.cpp @@ -13,6 +13,7 @@ #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/memory_manager.h" +#include "shared/source/os_interface/hw_info_config.h" #include "opencl/extensions/public/cl_gl_private_intel.h" #include "opencl/source/cl_device/cl_device.h" @@ -147,10 +148,10 @@ Image *GlTexture::createSharedGlTexture(Context *context, cl_mem_flags flags, cl auto glTexture = new GlTexture(sharingFunctions, getClGlObjectType(target), texture, texInfo, target, std::max(miplevel, 0)); if (texInfo.isAuxEnabled && alloc->getDefaultGmm()->unifiedAuxTranslationCapable()) { - auto &hwInfo = context->getDevice(0)->getHardwareInfo(); - auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily); - alloc->getDefaultGmm()->isCompressionEnabled = hwHelper.isPageTableManagerSupported(hwInfo) ? memoryManager->mapAuxGpuVA(alloc) - : true; + const auto &hwInfo = context->getDevice(0)->getHardwareInfo(); + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + alloc->getDefaultGmm()->isCompressionEnabled = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? memoryManager->mapAuxGpuVA(alloc) + : true; } auto multiGraphicsAllocation = MultiGraphicsAllocation(context->getDevice(0)->getRootDeviceIndex()); multiGraphicsAllocation.addAllocation(alloc); diff --git a/opencl/source/sharings/unified/unified_image.cpp b/opencl/source/sharings/unified/unified_image.cpp index a032233a76..3dda034a5a 100644 --- a/opencl/source/sharings/unified/unified_image.cpp +++ b/opencl/source/sharings/unified/unified_image.cpp @@ -14,6 +14,7 @@ #include "shared/source/helpers/hw_helper.h" #include "shared/source/memory_manager/graphics_allocation.h" #include "shared/source/memory_manager/memory_manager.h" +#include "shared/source/os_interface/hw_info_config.h" #include "opencl/source/cl_device/cl_device.h" #include "opencl/source/context/context.h" @@ -42,8 +43,8 @@ Image *UnifiedImage::createSharedUnifiedImage(Context *context, cl_mem_flags fla auto &memoryManager = *context->getMemoryManager(); if (graphicsAllocation->getDefaultGmm()->unifiedAuxTranslationCapable()) { const auto &hwInfo = context->getDevice(0)->getHardwareInfo(); - const auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily); - graphicsAllocation->getDefaultGmm()->isCompressionEnabled = hwHelper.isPageTableManagerSupported(hwInfo) ? memoryManager.mapAuxGpuVA(graphicsAllocation) : true; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + graphicsAllocation->getDefaultGmm()->isCompressionEnabled = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? memoryManager.mapAuxGpuVA(graphicsAllocation) : true; } const uint32_t baseMipmapIndex = 0u; diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp index a879bbc27a..bf0ec187e8 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp @@ -18,6 +18,7 @@ #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/memory_manager/surface.h" #include "shared/source/os_interface/device_factory.h" +#include "shared/source/os_interface/hw_info_config.h" #include "shared/source/utilities/tag_allocator.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/engine_descriptor_helper.h" @@ -1487,7 +1488,7 @@ TEST_F(CommandStreamReceiverPageTableManagerTest, givenDefaultEngineTypeAndNonEx MockCommandStreamReceiver commandStreamReceiver(executionEnvironment, 0u, deviceBitfield); auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo(); auto defaultEngineType = getChosenEngineType(*hwInfo); - bool supportsPageTableManager = HwHelper::get(hwInfo->platform.eRenderCoreFamily).isPageTableManagerSupported(*hwInfo); + bool supportsPageTableManager = HwInfoConfig::get(hwInfo->platform.eProductFamily)->isPageTableManagerSupported(*hwInfo); EXPECT_EQ(nullptr, executionEnvironment.rootDeviceEnvironments[0]->pageTableManager.get()); EXPECT_EQ(supportsPageTableManager, commandStreamReceiver.needsPageTableManager(defaultEngineType)); diff --git a/opencl/test/unit_test/d3d_sharing/d3d_aux_tests.cpp b/opencl/test/unit_test/d3d_sharing/d3d_aux_tests.cpp index 6e94129cad..8788c71b36 100644 --- a/opencl/test/unit_test/d3d_sharing/d3d_aux_tests.cpp +++ b/opencl/test/unit_test/d3d_sharing/d3d_aux_tests.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/memory_manager/os_agnostic_memory_manager.h" +#include "shared/source/os_interface/hw_info_config.h" #include "shared/source/utilities/arrayref.h" #include "opencl/source/api/api.h" @@ -37,9 +38,9 @@ TYPED_TEST_P(D3DAuxTests, given2dSharableTextureWithUnifiedAuxFlagsWhenCreatingT auto image = std::unique_ptr(D3DTexture::create2d(this->context, (D3DTexture2d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 4, nullptr)); ASSERT_NE(nullptr, image.get()); - auto hwInfo = context->getDevice(0)->getHardwareInfo(); - auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily); - uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0; + const auto &hwInfo = context->getDevice(0)->getHardwareInfo(); + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0; EXPECT_EQ(expectedMapAuxGpuVaCalls, mockMM->mapAuxGpuVACalled); EXPECT_TRUE(gmm->isCompressionEnabled); @@ -57,12 +58,12 @@ TYPED_TEST_P(D3DAuxTests, given2dSharableTextureWithUnifiedAuxFlagsWhenFailOnAux auto image = std::unique_ptr(D3DTexture::create2d(this->context, (D3DTexture2d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 4, nullptr)); ASSERT_NE(nullptr, image.get()); - auto hwInfo = context->getDevice(0)->getHardwareInfo(); - auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily); - uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0; + const auto &hwInfo = context->getDevice(0)->getHardwareInfo(); + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0; EXPECT_EQ(expectedMapAuxGpuVaCalls, mockMM->mapAuxGpuVACalled); - EXPECT_EQ(!hwHelper.isPageTableManagerSupported(hwInfo), gmm->isCompressionEnabled); + EXPECT_EQ(!hwInfoConfig.isPageTableManagerSupported(hwInfo), gmm->isCompressionEnabled); } TYPED_TEST_P(D3DAuxTests, given2dSharableTextureWithoutUnifiedAuxFlagsWhenCreatingThenDontMapAuxTable) { @@ -89,9 +90,9 @@ TYPED_TEST_P(D3DAuxTests, given2dNonSharableTextureWithUnifiedAuxFlagsWhenCreati auto image = std::unique_ptr(D3DTexture::create2d(this->context, (D3DTexture2d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr)); ASSERT_NE(nullptr, image.get()); - auto hwInfo = context->getDevice(0)->getHardwareInfo(); - auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily); - uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0; + const auto &hwInfo = context->getDevice(0)->getHardwareInfo(); + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0; EXPECT_EQ(expectedMapAuxGpuVaCalls, mockMM->mapAuxGpuVACalled); EXPECT_TRUE(gmm->isCompressionEnabled); @@ -106,9 +107,9 @@ TYPED_TEST_P(D3DAuxTests, given3dSharableTextureWithUnifiedAuxFlagsWhenCreatingT std::unique_ptr image(D3DTexture::create3d(this->context, (D3DTexture3d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr)); ASSERT_NE(nullptr, image.get()); - auto hwInfo = context->getDevice(0)->getHardwareInfo(); - auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily); - uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0; + const auto &hwInfo = context->getDevice(0)->getHardwareInfo(); + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0; EXPECT_EQ(expectedMapAuxGpuVaCalls, mockMM->mapAuxGpuVACalled); EXPECT_TRUE(gmm->isCompressionEnabled); @@ -124,12 +125,12 @@ TYPED_TEST_P(D3DAuxTests, given3dSharableTextureWithUnifiedAuxFlagsWhenFailOnAux std::unique_ptr image(D3DTexture::create3d(this->context, (D3DTexture3d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr)); ASSERT_NE(nullptr, image.get()); - auto hwInfo = context->getDevice(0)->getHardwareInfo(); - auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily); - uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0; + const auto &hwInfo = context->getDevice(0)->getHardwareInfo(); + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0; EXPECT_EQ(expectedMapAuxGpuVaCalls, mockMM->mapAuxGpuVACalled); - EXPECT_EQ(!hwHelper.isPageTableManagerSupported(hwInfo), gmm->isCompressionEnabled); + EXPECT_EQ(!hwInfoConfig.isPageTableManagerSupported(hwInfo), gmm->isCompressionEnabled); } TYPED_TEST_P(D3DAuxTests, given3dSharableTextureWithoutUnifiedAuxFlagsWhenCreatingThenDontMapAuxTable) { @@ -154,9 +155,9 @@ TYPED_TEST_P(D3DAuxTests, given3dNonSharableTextureWithUnifiedAuxFlagsWhenCreati std::unique_ptr image(D3DTexture::create3d(this->context, (D3DTexture3d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr)); ASSERT_NE(nullptr, image.get()); - auto hwInfo = context->getDevice(0)->getHardwareInfo(); - auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily); - uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0; + const auto &hwInfo = context->getDevice(0)->getHardwareInfo(); + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0; EXPECT_EQ(expectedMapAuxGpuVaCalls, mockMM->mapAuxGpuVACalled); EXPECT_TRUE(gmm->isCompressionEnabled); diff --git a/opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl b/opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl index 14663298db..15b115381c 100644 --- a/opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl +++ b/opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl @@ -91,26 +91,6 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenGen12LpPlatformWhenSetupHardwareCapabili EXPECT_TRUE(hwCaps.isStatelesToStatefullWithOffsetSupported); } -GEN12LPTEST_F(HwHelperTestGen12Lp, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) { - auto &helper = HwHelper::get(renderCoreFamily); - - hardwareInfo.capabilityTable.ftrRenderCompressedBuffers = false; - hardwareInfo.capabilityTable.ftrRenderCompressedImages = false; - EXPECT_FALSE(helper.isPageTableManagerSupported(hardwareInfo)); - - hardwareInfo.capabilityTable.ftrRenderCompressedBuffers = true; - hardwareInfo.capabilityTable.ftrRenderCompressedImages = false; - EXPECT_TRUE(helper.isPageTableManagerSupported(hardwareInfo)); - - hardwareInfo.capabilityTable.ftrRenderCompressedBuffers = false; - hardwareInfo.capabilityTable.ftrRenderCompressedImages = true; - EXPECT_TRUE(helper.isPageTableManagerSupported(hardwareInfo)); - - hardwareInfo.capabilityTable.ftrRenderCompressedBuffers = true; - hardwareInfo.capabilityTable.ftrRenderCompressedImages = true; - EXPECT_TRUE(helper.isPageTableManagerSupported(hardwareInfo)); -} - GEN12LPTEST_F(HwHelperTestGen12Lp, givenDifferentSizesOfAllocationWhenCheckingCompressionPreferenceThenReturnCorrectValue) { auto &helper = HwHelper::get(renderCoreFamily); diff --git a/opencl/test/unit_test/gen12lp/linux/hw_info_config_tests_gen12lp.cpp b/opencl/test/unit_test/gen12lp/linux/hw_info_config_tests_gen12lp.cpp index f282e62987..b833410dbe 100644 --- a/opencl/test/unit_test/gen12lp/linux/hw_info_config_tests_gen12lp.cpp +++ b/opencl/test/unit_test/gen12lp/linux/hw_info_config_tests_gen12lp.cpp @@ -15,9 +15,9 @@ using namespace NEO; -using HwInfoConfigTestWindowsGen12lp = HwInfoConfigTestLinux; +using HwInfoConfigTestLinuxGen12lp = HwInfoConfigTestLinux; -GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) { +GEN12LPTEST_F(HwInfoConfigTestLinuxGen12lp, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) { auto hwInfoConfig = HwInfoConfig::get(productFamily); PLATFORM *testPlatform = &outHwInfo.platform; @@ -28,3 +28,23 @@ GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenGen12LpProductWhenAdjustPlatf EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eRenderCoreFamily); EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eDisplayCoreFamily); } + +GEN12LPTEST_F(HwInfoConfigTestLinuxGen12lp, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) { + const auto &hwInfoConfig = *HwInfoConfig::get(productFamily); + + outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false; + outHwInfo.capabilityTable.ftrRenderCompressedImages = false; + EXPECT_FALSE(hwInfoConfig.isPageTableManagerSupported(outHwInfo)); + + outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true; + outHwInfo.capabilityTable.ftrRenderCompressedImages = false; + EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo)); + + outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false; + outHwInfo.capabilityTable.ftrRenderCompressedImages = true; + EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo)); + + outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true; + outHwInfo.capabilityTable.ftrRenderCompressedImages = true; + EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo)); +} diff --git a/opencl/test/unit_test/gen12lp/windows/hw_info_config_tests_gen12lp.cpp b/opencl/test/unit_test/gen12lp/windows/hw_info_config_tests_gen12lp.cpp index 08e39ac8e1..d4b9ff290e 100644 --- a/opencl/test/unit_test/gen12lp/windows/hw_info_config_tests_gen12lp.cpp +++ b/opencl/test/unit_test/gen12lp/windows/hw_info_config_tests_gen12lp.cpp @@ -31,7 +31,7 @@ GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenE2ECSetByKmdWhenConfiguringHw EXPECT_FALSE(outHwInfo.capabilityTable.ftrRenderCompressedImages); } -GEN12LPTEST_F(HwInfoConfigTestWindows, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) { +GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) { auto hwInfoConfig = HwInfoConfig::get(productFamily); PLATFORM *testPlatform = &outHwInfo.platform; @@ -42,3 +42,23 @@ GEN12LPTEST_F(HwInfoConfigTestWindows, givenGen12LpProductWhenAdjustPlatformForP EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eRenderCoreFamily); EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eDisplayCoreFamily); } + +GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) { + const auto &hwInfoConfig = *HwInfoConfig::get(productFamily); + + outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false; + outHwInfo.capabilityTable.ftrRenderCompressedImages = false; + EXPECT_FALSE(hwInfoConfig.isPageTableManagerSupported(outHwInfo)); + + outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true; + outHwInfo.capabilityTable.ftrRenderCompressedImages = false; + EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo)); + + outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false; + outHwInfo.capabilityTable.ftrRenderCompressedImages = true; + EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo)); + + outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true; + outHwInfo.capabilityTable.ftrRenderCompressedImages = true; + EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo)); +} diff --git a/opencl/test/unit_test/helpers/hw_helper_tests.cpp b/opencl/test/unit_test/helpers/hw_helper_tests.cpp index 85da055646..5a7ad30c35 100644 --- a/opencl/test/unit_test/helpers/hw_helper_tests.cpp +++ b/opencl/test/unit_test/helpers/hw_helper_tests.cpp @@ -184,11 +184,6 @@ HWTEST2_F(HwHelperTest, givenHwHelperWhenGettingThreadsPerEUConfigsThenNoConfigs EXPECT_EQ(0U, configs.size()); } -HWTEST_F(HwHelperTest, givenHwHelperWhenAskedForPageTableManagerSupportThenReturnCorrectValue) { - auto &helper = HwHelper::get(renderCoreFamily); - EXPECT_EQ(helper.isPageTableManagerSupported(hardwareInfo), UnitTestHelper::isPageTableManagerSupported(hardwareInfo)); -} - HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, givenHwHelperWhenGetGpuTimeStampInNSIsCalledThenCorrectValueIsReturned) { auto &helper = HwHelper::get(renderCoreFamily); diff --git a/opencl/test/unit_test/memory_manager/memory_manager_tests.cpp b/opencl/test/unit_test/memory_manager/memory_manager_tests.cpp index 5f9e53851d..1895b8531f 100644 --- a/opencl/test/unit_test/memory_manager/memory_manager_tests.cpp +++ b/opencl/test/unit_test/memory_manager/memory_manager_tests.cpp @@ -12,6 +12,7 @@ #include "shared/source/memory_manager/graphics_allocation.h" #include "shared/source/memory_manager/internal_allocation_storage.h" #include "shared/source/memory_manager/residency.h" +#include "shared/source/os_interface/hw_info_config.h" #include "shared/source/os_interface/os_context.h" #include "shared/source/os_interface/os_interface.h" #include "shared/source/program/program_initialization.h" @@ -2769,7 +2770,7 @@ HWTEST_F(PageTableManagerTest, givenMemoryManagerThatSupportsPageTableManagerWhe bool mapped = memoryManager->mapAuxGpuVA(&allocation); auto hwInfo = executionEnvironment->rootDeviceEnvironments[allocation.getRootDeviceIndex()]->getHardwareInfo(); - EXPECT_EQ(HwHelper::get(hwInfo->platform.eRenderCoreFamily).isPageTableManagerSupported(*hwInfo), mapped); + EXPECT_EQ(HwInfoConfig::get(hwInfo->platform.eProductFamily)->isPageTableManagerSupported(*hwInfo), mapped); } TEST(MemoryManagerTest, givenDebugModuleAreaAllocationTypeWhenCallingGetAllocationDataThenUse32BitFrontWindowsIsSet) { diff --git a/opencl/test/unit_test/os_interface/hw_info_config_tests.cpp b/opencl/test/unit_test/os_interface/hw_info_config_tests.cpp index 7669b6471a..4b21c96675 100644 --- a/opencl/test/unit_test/os_interface/hw_info_config_tests.cpp +++ b/opencl/test/unit_test/os_interface/hw_info_config_tests.cpp @@ -10,6 +10,7 @@ #include "shared/source/helpers/hw_helper.h" #include "shared/source/os_interface/hw_info_config.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" +#include "shared/test/common/helpers/unit_test_helper.h" #include "shared/test/unit_test/utilities/base_object_utils.h" #include "opencl/source/cl_device/cl_device.h" @@ -153,3 +154,8 @@ HWTEST_F(HwInfoConfigTest, givenHardwareInfoWhenCallingIsMaxThreadsForWorkgroupW EXPECT_FALSE(ret); } + +HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedForPageTableManagerSupportThenReturnCorrectValue) { + const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily); + EXPECT_EQ(hwInfoConfig.isPageTableManagerSupported(pInHwInfo), UnitTestHelper::isPageTableManagerSupported(pInHwInfo)); +} diff --git a/opencl/test/unit_test/os_interface/linux/hw_info_config_linux_tests.cpp b/opencl/test/unit_test/os_interface/linux/hw_info_config_linux_tests.cpp index 0c869da8bd..ccd5c5d53c 100644 --- a/opencl/test/unit_test/os_interface/linux/hw_info_config_linux_tests.cpp +++ b/opencl/test/unit_test/os_interface/linux/hw_info_config_linux_tests.cpp @@ -116,6 +116,11 @@ template <> bool HwInfoConfigHw::obtainBlitterPreference(const HardwareInfo &hwInfo) const { return false; } + +template <> +bool HwInfoConfigHw::isPageTableManagerSupported(const HardwareInfo &hwInfo) const { + return false; +} } // namespace NEO struct DummyHwConfig : HwInfoConfigHw { @@ -636,3 +641,8 @@ HWTEST_F(HwInfoConfigTestLinuxDummy, givenHardwareInfoWhenCallingObtainBlitterPr bool ret = hwConfig.obtainBlitterPreference(outHwInfo); EXPECT_FALSE(ret); } + +HWTEST_F(HwInfoConfigTestLinuxDummy, givenHardwareInfoWhenCallingIsPageTableManagerSupportedThenFalseIsReturned) { + bool ret = hwConfig.isPageTableManagerSupported(outHwInfo); + EXPECT_FALSE(ret); +} diff --git a/opencl/test/unit_test/os_interface/raii_hw_info_config.h b/opencl/test/unit_test/os_interface/raii_hw_info_config.h new file mode 100644 index 0000000000..7e2f44e859 --- /dev/null +++ b/opencl/test/unit_test/os_interface/raii_hw_info_config.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#pragma once + +#include "shared/source/os_interface/hw_info_config.h" + +namespace NEO { +extern HwInfoConfig *hwInfoConfigFactory[IGFX_MAX_PRODUCT]; + +template +class RAIIHwInfoConfigFactory { + public: + PRODUCT_FAMILY productFamily; + HwInfoConfig *hwInfoConfig; + MockHwInfoConfig mockHwInfoConfig; + + RAIIHwInfoConfigFactory(PRODUCT_FAMILY productFamily) { + this->productFamily = productFamily; + hwInfoConfig = hwInfoConfigFactory[this->productFamily]; + hwInfoConfigFactory[this->productFamily] = &mockHwInfoConfig; + } + + ~RAIIHwInfoConfigFactory() { + hwInfoConfigFactory[this->productFamily] = hwInfoConfig; + } +}; +} // namespace NEO \ No newline at end of file diff --git a/opencl/test/unit_test/os_interface/windows/hw_info_config_win_tests.cpp b/opencl/test/unit_test/os_interface/windows/hw_info_config_win_tests.cpp index a77b5950bc..b07bdff365 100644 --- a/opencl/test/unit_test/os_interface/windows/hw_info_config_win_tests.cpp +++ b/opencl/test/unit_test/os_interface/windows/hw_info_config_win_tests.cpp @@ -9,6 +9,7 @@ #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/hw_helper.h" +#include "shared/source/os_interface/hw_info_config.h" #include "shared/source/os_interface/os_interface.h" #include "shared/source/os_interface/windows/wddm/wddm.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" @@ -95,6 +96,11 @@ bool HwInfoConfigHw::obtainBlitterPreference(const HardwareInfo &h return false; } +template <> +bool HwInfoConfigHw::isPageTableManagerSupported(const HardwareInfo &hwInfo) const { + return false; +} + HwInfoConfigTestWindows::HwInfoConfigTestWindows() { this->executionEnvironment = std::make_unique(); this->rootDeviceEnvironment = std::make_unique(*executionEnvironment); @@ -177,4 +183,9 @@ HWTEST_F(HwInfoConfigTestWindows, givenHardwareInfoWhenCallingObtainBlitterPrefe EXPECT_FALSE(ret); } +HWTEST_F(HwInfoConfigTestWindows, givenHardwareInfoWhenCallingIsPageTableManagerSupportedThenFalseIsReturned) { + bool ret = hwConfig.isPageTableManagerSupported(outHwInfo); + EXPECT_FALSE(ret); +} + } // namespace NEO diff --git a/opencl/test/unit_test/sharings/gl/windows/gl_texture_tests.cpp b/opencl/test/unit_test/sharings/gl/windows/gl_texture_tests.cpp index d300922991..9828f7b7e7 100644 --- a/opencl/test/unit_test/sharings/gl/windows/gl_texture_tests.cpp +++ b/opencl/test/unit_test/sharings/gl/windows/gl_texture_tests.cpp @@ -5,6 +5,8 @@ * */ +#include "shared/source/os_interface/hw_info_config.h" + #include "opencl/source/helpers/gmm_types_converter.h" #include "opencl/source/mem_obj/image.h" #include "opencl/source/platform/platform.h" @@ -541,9 +543,9 @@ TEST_F(GlSharingTextureTests, givenMockGlWhenGlTextureIsCreatedWithUnifiedAuxSur auto glTexture = std::unique_ptr(GlTexture::createSharedGlTexture(clContext.get(), CL_MEM_WRITE_ONLY, GL_SRGB8_ALPHA8, 0, textureId, &retVal)); - auto hwInfo = clContext->getDevice(0)->getHardwareInfo(); - auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily); - uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0; + const auto &hwInfo = clContext->getDevice(0)->getHardwareInfo(); + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0; EXPECT_EQ(expectedMapAuxGpuVaCalls, tempMM->mapAuxGpuVACalled); } diff --git a/opencl/test/unit_test/sharings/unified/unified_sharing_image_tests.cpp b/opencl/test/unit_test/sharings/unified/unified_sharing_image_tests.cpp index 3ec05b5969..a50d095226 100644 --- a/opencl/test/unit_test/sharings/unified/unified_sharing_image_tests.cpp +++ b/opencl/test/unit_test/sharings/unified/unified_sharing_image_tests.cpp @@ -9,8 +9,8 @@ #include "opencl/source/mem_obj/image.h" #include "opencl/source/sharings/unified/unified_image.h" -#include "opencl/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/test/unit_test/mocks/mock_gmm_resource_info.h" +#include "opencl/test/unit_test/os_interface/raii_hw_info_config.h" #include "opencl/test/unit_test/sharings/unified/unified_sharing_fixtures.h" #include "opencl/test/unit_test/sharings/unified/unified_sharing_mocks.h" @@ -96,8 +96,8 @@ TEST_F(UnifiedSharingImageTestsWithMemoryManager, givenPassedFormatWhenCreatingU EXPECT_EQ(GFX3DSTATE_SURFACEFORMAT_R16G16_FLOAT, image->getSurfaceFormatInfo().surfaceFormat.GenxSurfaceFormat); } -template -class MockHwHelper : public HwHelperHw { +template +class MockHwInfoConfig : public HwInfoConfigHw { public: bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override { return pageTableManagerSupported; @@ -128,8 +128,8 @@ struct MemoryManagerReturningCompressedAllocations : UnifiedSharingMockMemoryMan HWTEST_F(UnifiedSharingImageTestsWithMemoryManager, givenCompressedImageAndNoPageTableManagerWhenCreatingUnifiedImageThenSetCorrespondingFieldInGmmAndDoNotUsePageTableManager) { MemoryManagerReturningCompressedAllocations memoryManager{}; VariableBackup memoryManagerBackup{&this->context->memoryManager, &memoryManager}; - using HwHelperNotSupportingPageTableManager = MockHwHelper; - RAIIHwHelperFactory hwHelperBackup{this->context->getDevice(0)->getHardwareInfo().platform.eRenderCoreFamily}; + using HwInfoConfigNotSupportingPageTableManager = MockHwInfoConfig; + RAIIHwInfoConfigFactory hwInfoConfigBackup{this->context->getDevice(0)->getHardwareInfo().platform.eProductFamily}; cl_mem_flags flags{}; cl_int retVal{}; @@ -145,8 +145,8 @@ HWTEST_F(UnifiedSharingImageTestsWithMemoryManager, givenCompressedImageAndNoPag HWTEST_F(UnifiedSharingImageTestsWithMemoryManager, givenCompressedImageAndPageTableManagerWhenCreatingUnifiedImageThenSetCorrespondingFieldInGmmBasedOnAuxGpuVaMappingResult) { MemoryManagerReturningCompressedAllocations memoryManager{}; VariableBackup memoryManagerBackup{&this->context->memoryManager, &memoryManager}; - using HwHelperSupportingPageTableManager = MockHwHelper; - RAIIHwHelperFactory hwHelperBackup{this->context->getDevice(0)->getHardwareInfo().platform.eRenderCoreFamily}; + using HwInfoConfigNotSupportingPageTableManager = MockHwInfoConfig; + RAIIHwInfoConfigFactory hwInfoConfigBackup{this->context->getDevice(0)->getHardwareInfo().platform.eProductFamily}; cl_mem_flags flags{}; cl_int retVal{}; diff --git a/shared/source/command_stream/command_stream_receiver.cpp b/shared/source/command_stream/command_stream_receiver.cpp index 34f350910e..32da32375d 100644 --- a/shared/source/command_stream/command_stream_receiver.cpp +++ b/shared/source/command_stream/command_stream_receiver.cpp @@ -24,6 +24,7 @@ #include "shared/source/memory_manager/internal_allocation_storage.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/memory_manager/surface.h" +#include "shared/source/os_interface/hw_info_config.h" #include "shared/source/os_interface/os_context.h" #include "shared/source/os_interface/os_interface.h" #include "shared/source/utilities/cpuintrinsics.h" @@ -665,7 +666,7 @@ bool CommandStreamReceiver::needsPageTableManager(aub_stream::EngineType engineT if (rootDeviceEnvironment->pageTableManager.get() != nullptr) { return false; } - return HwHelper::get(hwInfo->platform.eRenderCoreFamily).isPageTableManagerSupported(*hwInfo); + return HwInfoConfig::get(hwInfo->platform.eProductFamily)->isPageTableManagerSupported(*hwInfo); } void CommandStreamReceiver::printDeviceIndex() { diff --git a/shared/source/gen12lp/hw_helper_gen12lp.cpp b/shared/source/gen12lp/hw_helper_gen12lp.cpp index 0e43fe2e27..bc0dde1a20 100644 --- a/shared/source/gen12lp/hw_helper_gen12lp.cpp +++ b/shared/source/gen12lp/hw_helper_gen12lp.cpp @@ -69,11 +69,6 @@ bool HwHelperHw::isLocalMemoryEnabled(const HardwareInfo &hwInfo) const return Gen12LPHelpers::isLocalMemoryEnabled(hwInfo); } -template <> -bool HwHelperHw::isPageTableManagerSupported(const HardwareInfo &hwInfo) const { - return hwInfo.capabilityTable.ftrRenderCompressedBuffers || hwInfo.capabilityTable.ftrRenderCompressedImages; -} - template <> uint32_t HwHelperHw::getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const { if (hwInfo.platform.eProductFamily == PRODUCT_FAMILY::IGFX_TIGERLAKE_LP) { diff --git a/shared/source/gen12lp/linux/hw_info_config_adlp.cpp b/shared/source/gen12lp/linux/hw_info_config_adlp.cpp index 42b3be767d..f1676d14c5 100644 --- a/shared/source/gen12lp/linux/hw_info_config_adlp.cpp +++ b/shared/source/gen12lp/linux/hw_info_config_adlp.cpp @@ -11,6 +11,9 @@ #include "shared/source/os_interface/hw_info_config_bdw_and_later.inl" namespace NEO { +constexpr static auto gfxProduct = IGFX_ALDERLAKE_P; + +#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl" template <> void HwInfoConfigHw::adjustPlatformForProductFamily(HardwareInfo *hwInfo) { diff --git a/shared/source/gen12lp/linux/hw_info_config_adls.cpp b/shared/source/gen12lp/linux/hw_info_config_adls.cpp index 016e08bd4d..2086d6189c 100644 --- a/shared/source/gen12lp/linux/hw_info_config_adls.cpp +++ b/shared/source/gen12lp/linux/hw_info_config_adls.cpp @@ -12,6 +12,9 @@ #include "shared/source/os_interface/hw_info_config_bdw_and_later.inl" namespace NEO { +constexpr static auto gfxProduct = IGFX_ALDERLAKE_S; + +#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl" template <> void HwInfoConfigHw::adjustPlatformForProductFamily(HardwareInfo *hwInfo) { diff --git a/shared/source/gen12lp/linux/hw_info_config_dg1.cpp b/shared/source/gen12lp/linux/hw_info_config_dg1.cpp index f0537d2842..f5f081b409 100644 --- a/shared/source/gen12lp/linux/hw_info_config_dg1.cpp +++ b/shared/source/gen12lp/linux/hw_info_config_dg1.cpp @@ -12,6 +12,9 @@ #include "shared/source/os_interface/hw_info_config_bdw_and_later.inl" namespace NEO { +constexpr static auto gfxProduct = IGFX_DG1; + +#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl" template <> void HwInfoConfigHw::adjustPlatformForProductFamily(HardwareInfo *hwInfo) { diff --git a/shared/source/gen12lp/linux/hw_info_config_rkl.cpp b/shared/source/gen12lp/linux/hw_info_config_rkl.cpp index 7bdc9cc328..475ae34fb1 100644 --- a/shared/source/gen12lp/linux/hw_info_config_rkl.cpp +++ b/shared/source/gen12lp/linux/hw_info_config_rkl.cpp @@ -12,6 +12,9 @@ #include "shared/source/os_interface/hw_info_config_bdw_and_later.inl" namespace NEO { +constexpr static auto gfxProduct = IGFX_ROCKETLAKE; + +#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl" template <> void HwInfoConfigHw::adjustPlatformForProductFamily(HardwareInfo *hwInfo) { diff --git a/shared/source/gen12lp/linux/hw_info_config_tgllp.cpp b/shared/source/gen12lp/linux/hw_info_config_tgllp.cpp index 7f287a1f85..78b8f32fb0 100644 --- a/shared/source/gen12lp/linux/hw_info_config_tgllp.cpp +++ b/shared/source/gen12lp/linux/hw_info_config_tgllp.cpp @@ -12,6 +12,9 @@ #include "shared/source/os_interface/hw_info_config_bdw_and_later.inl" namespace NEO { +constexpr static auto gfxProduct = IGFX_TIGERLAKE_LP; + +#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl" template <> void HwInfoConfigHw::adjustPlatformForProductFamily(HardwareInfo *hwInfo) { diff --git a/shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl b/shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl new file mode 100644 index 0000000000..9ff14406a5 --- /dev/null +++ b/shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl @@ -0,0 +1,11 @@ +/* + * Copyright (C) 2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +template <> +bool HwInfoConfigHw::isPageTableManagerSupported(const HardwareInfo &hwInfo) const { + return hwInfo.capabilityTable.ftrRenderCompressedBuffers || hwInfo.capabilityTable.ftrRenderCompressedImages; +} diff --git a/shared/source/gen12lp/windows/hw_info_config_adlp.cpp b/shared/source/gen12lp/windows/hw_info_config_adlp.cpp index d07a233941..60f266f999 100644 --- a/shared/source/gen12lp/windows/hw_info_config_adlp.cpp +++ b/shared/source/gen12lp/windows/hw_info_config_adlp.cpp @@ -11,6 +11,9 @@ #include "shared/source/os_interface/hw_info_config_bdw_and_later.inl" namespace NEO { +constexpr static auto gfxProduct = IGFX_ALDERLAKE_P; + +#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl" template <> void HwInfoConfigHw::adjustPlatformForProductFamily(HardwareInfo *hwInfo) { diff --git a/shared/source/gen12lp/windows/hw_info_config_adls.cpp b/shared/source/gen12lp/windows/hw_info_config_adls.cpp index a25d9d0168..6addaa80fb 100644 --- a/shared/source/gen12lp/windows/hw_info_config_adls.cpp +++ b/shared/source/gen12lp/windows/hw_info_config_adls.cpp @@ -12,6 +12,9 @@ #include "shared/source/os_interface/hw_info_config_bdw_and_later.inl" namespace NEO { +constexpr static auto gfxProduct = IGFX_ALDERLAKE_S; + +#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl" template <> void HwInfoConfigHw::adjustPlatformForProductFamily(HardwareInfo *hwInfo) { diff --git a/shared/source/gen12lp/windows/hw_info_config_dg1.cpp b/shared/source/gen12lp/windows/hw_info_config_dg1.cpp index 00179237e6..74ff952a2d 100644 --- a/shared/source/gen12lp/windows/hw_info_config_dg1.cpp +++ b/shared/source/gen12lp/windows/hw_info_config_dg1.cpp @@ -12,6 +12,9 @@ #include "shared/source/os_interface/hw_info_config_bdw_and_later.inl" namespace NEO { +constexpr static auto gfxProduct = IGFX_DG1; + +#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl" template <> void HwInfoConfigHw::adjustPlatformForProductFamily(HardwareInfo *hwInfo) { diff --git a/shared/source/gen12lp/windows/hw_info_config_rkl.cpp b/shared/source/gen12lp/windows/hw_info_config_rkl.cpp index 40772f2b37..7a9f4a9044 100644 --- a/shared/source/gen12lp/windows/hw_info_config_rkl.cpp +++ b/shared/source/gen12lp/windows/hw_info_config_rkl.cpp @@ -12,6 +12,9 @@ #include "shared/source/os_interface/hw_info_config_bdw_and_later.inl" namespace NEO { +constexpr static auto gfxProduct = IGFX_ROCKETLAKE; + +#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl" template <> void HwInfoConfigHw::adjustPlatformForProductFamily(HardwareInfo *hwInfo) { diff --git a/shared/source/gen12lp/windows/hw_info_config_tgllp.cpp b/shared/source/gen12lp/windows/hw_info_config_tgllp.cpp index 43e38fd8ac..ce266a2b76 100644 --- a/shared/source/gen12lp/windows/hw_info_config_tgllp.cpp +++ b/shared/source/gen12lp/windows/hw_info_config_tgllp.cpp @@ -12,6 +12,9 @@ #include "shared/source/os_interface/hw_info_config_bdw_and_later.inl" namespace NEO { +constexpr static auto gfxProduct = IGFX_TIGERLAKE_LP; + +#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl" template <> void HwInfoConfigHw::adjustPlatformForProductFamily(HardwareInfo *hwInfo) { diff --git a/shared/source/helpers/hw_helper.h b/shared/source/helpers/hw_helper.h index ac9d8a8fe6..8874b24998 100644 --- a/shared/source/helpers/hw_helper.h +++ b/shared/source/helpers/hw_helper.h @@ -60,7 +60,6 @@ class HwHelper { virtual bool isL3Configurable(const HardwareInfo &hwInfo) = 0; virtual SipKernelType getSipKernelType(bool debuggingActive) const = 0; virtual bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) const = 0; - virtual bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const = 0; virtual bool is1MbAlignmentSupported(const HardwareInfo &hwInfo, bool isCompressionEnabled) const = 0; virtual bool isFenceAllocationRequired(const HardwareInfo &hwInfo) const = 0; virtual const AubMemDump::LrcaHelper &getCsTraits(aub_stream::EngineType engineType) const = 0; @@ -238,8 +237,6 @@ class HwHelperHw : public HwHelper { bool timestampPacketWriteSupported() const override; - bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override; - bool is1MbAlignmentSupported(const HardwareInfo &hwInfo, bool isCompressionEnabled) const override; bool isFenceAllocationRequired(const HardwareInfo &hwInfo) const override; diff --git a/shared/source/helpers/hw_helper_base.inl b/shared/source/helpers/hw_helper_base.inl index 8af307c568..cd823c15c1 100644 --- a/shared/source/helpers/hw_helper_base.inl +++ b/shared/source/helpers/hw_helper_base.inl @@ -81,11 +81,6 @@ const AubMemDump::LrcaHelper &HwHelperHw::getCsTraits(aub_stream::Engine return *AUBFamilyMapper::csTraits[engineType]; } -template -bool HwHelperHw::isPageTableManagerSupported(const HardwareInfo &hwInfo) const { - return false; -} - template bool HwHelperHw::isFenceAllocationRequired(const HardwareInfo &hwInfo) const { return false; diff --git a/shared/source/os_interface/hw_info_config.h b/shared/source/os_interface/hw_info_config.h index d29a828a4a..1ef7209119 100644 --- a/shared/source/os_interface/hw_info_config.h +++ b/shared/source/os_interface/hw_info_config.h @@ -45,6 +45,7 @@ class HwInfoConfig { virtual uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const = 0; virtual void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) = 0; virtual bool obtainBlitterPreference(const HardwareInfo &hwInfo) const = 0; + virtual bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const = 0; uint32_t threadsPerEu; }; @@ -73,6 +74,7 @@ class HwInfoConfigHw : public HwInfoConfig { uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const override; void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) override; bool obtainBlitterPreference(const HardwareInfo &hwInfo) const override; + bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override; protected: HwInfoConfigHw() = default; diff --git a/shared/source/os_interface/hw_info_config.inl b/shared/source/os_interface/hw_info_config.inl index 92ddae242c..f576dece14 100644 --- a/shared/source/os_interface/hw_info_config.inl +++ b/shared/source/os_interface/hw_info_config.inl @@ -98,4 +98,9 @@ uint32_t HwInfoConfigHw::getMaxThreadsForWorkgroup(const HardwareInf template void HwInfoConfigHw::setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) {} + +template +bool HwInfoConfigHw::isPageTableManagerSupported(const HardwareInfo &hwInfo) const { + return false; +} } // namespace NEO diff --git a/shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp b/shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp index beff8edc56..23bc4c5fd1 100644 --- a/shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp +++ b/shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp @@ -47,11 +47,6 @@ inline bool HwHelperHw::isSpecialWorkgroupSizeRequired(const HardwareInf } } -template <> -bool HwHelperHw::isPageTableManagerSupported(const HardwareInfo &hwInfo) const { - return false; -} - template <> bool HwHelperHw::isNewResidencyModelSupported() const { return true;