From c867a5ed5dfddf75dddbccd579136a5d6ad001af Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Fri, 3 Jan 2025 10:16:25 +0000 Subject: [PATCH] refactor: remove redundant flag levelZeroSupported all platforms are supported by L0 Signed-off-by: Mateusz Jablonski --- .../core/source/driver/driver_handle_imp.cpp | 5 +- .../test/common/ult_specific_config_l0.cpp | 6 +- .../unit_tests/sources/driver/test_driver.cpp | 94 +------------------ .../driver/sysman_driver_handle_imp.cpp | 5 +- .../sources/linux/test_sysman_driver.cpp | 77 +-------------- .../unit_test/ult_specific_config_ocl.cpp | 6 +- shared/source/gen12lp/hw_info_adln.cpp | 3 +- shared/source/gen12lp/hw_info_adlp.cpp | 3 +- shared/source/gen12lp/hw_info_adls.cpp | 3 +- shared/source/gen12lp/hw_info_dg1.cpp | 3 +- shared/source/gen12lp/hw_info_rkl.cpp | 3 +- shared/source/gen12lp/hw_info_tgllp.cpp | 3 +- shared/source/helpers/hw_info.h | 4 +- shared/source/xe2_hpg_core/hw_info_bmg.cpp | 3 +- shared/source/xe2_hpg_core/hw_info_lnl.cpp | 3 +- shared/source/xe_hpc_core/hw_info_pvc.cpp | 3 +- shared/source/xe_hpg_core/hw_info_arl.cpp | 3 +- shared/source/xe_hpg_core/hw_info_dg2.cpp | 3 +- shared/source/xe_hpg_core/hw_info_mtl.cpp | 3 +- shared/test/common/common_main.cpp | 9 +- .../gen12lp/adln/test_product_helper_adln.cpp | 7 +- .../gen12lp/adlp/test_product_helper_adlp.cpp | 7 +- .../gen12lp/adls/test_product_helper_adls.cpp | 7 +- .../gen12lp/rkl/test_product_helper_rkl.cpp | 7 +- shared/test/unit_test/ult_specific_config.cpp | 6 +- 25 files changed, 25 insertions(+), 251 deletions(-) diff --git a/level_zero/core/source/driver/driver_handle_imp.cpp b/level_zero/core/source/driver/driver_handle_imp.cpp index a3952bb472..fbfcdd9bf7 100644 --- a/level_zero/core/source/driver/driver_handle_imp.cpp +++ b/level_zero/core/source/driver/driver_handle_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2024 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -232,9 +232,6 @@ ze_result_t DriverHandleImp::initialize(std::vector for (auto &neoDevice : neoDevices) { ze_result_t returnValue = ZE_RESULT_SUCCESS; - if (!neoDevice->getHardwareInfo().capabilityTable.levelZeroSupported) { - continue; - } if (this->memoryManager == nullptr) { this->memoryManager = neoDevice->getMemoryManager(); diff --git a/level_zero/core/test/common/ult_specific_config_l0.cpp b/level_zero/core/test/common/ult_specific_config_l0.cpp index 8ea73e6953..ab11232d64 100644 --- a/level_zero/core/test/common/ult_specific_config_l0.cpp +++ b/level_zero/core/test/common/ult_specific_config_l0.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2023 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -24,10 +24,6 @@ void applyWorkarounds() { } } -bool isPlatformSupported(const HardwareInfo &hwInfoForTests) { - return L0::commandListFactory[hwInfoForTests.platform.eProductFamily] && hwInfoForTests.capabilityTable.levelZeroSupported; -} - void setupTestFiles(std::string testBinaryFiles, int32_t revId) { std::string testBinaryFilesApiSpecific = testBinaryFiles; testBinaryFilesApiSpecific.append("/level_zero/"); diff --git a/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp b/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp index 932772692e..8602e45b46 100644 --- a/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp +++ b/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2024 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -465,7 +465,6 @@ TEST(DriverTestFamilySupport, whenInitializingDriverOnSupportedFamilyThenDriverI ze_result_t returnValue; NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get(); - hwInfo.capabilityTable.levelZeroSupported = true; NEO::MockDevice *neoDevice = NEO::MockDevice::createWithNewExecutionEnvironment(&hwInfo); NEO::DeviceVector devices; @@ -477,24 +476,10 @@ TEST(DriverTestFamilySupport, whenInitializingDriverOnSupportedFamilyThenDriverI L0::globalDriver = nullptr; } -TEST(DriverTestFamilySupport, whenInitializingDriverOnNotSupportedFamilyThenDriverIsNotCreated) { - ze_result_t returnValue; - NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get(); - hwInfo.capabilityTable.levelZeroSupported = false; - - NEO::MockDevice *neoDevice = NEO::MockDevice::createWithNewExecutionEnvironment(&hwInfo); - NEO::DeviceVector devices; - devices.push_back(std::unique_ptr(neoDevice)); - - auto driverHandle = DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue); - EXPECT_EQ(nullptr, driverHandle); -} - TEST(DriverTest, givenNullEnvVariableWhenCreatingDriverThenEnableProgramDebuggingIsFalse) { ze_result_t returnValue; NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get(); - hwInfo.capabilityTable.levelZeroSupported = true; NEO::MockDevice *neoDevice = NEO::MockDevice::createWithNewExecutionEnvironment(&hwInfo); NEO::DeviceVector devices; @@ -534,7 +519,6 @@ TEST_F(DriverImpTest, givenDriverImpWhenInitializedThenEnvVariablesAreRead) { TEST_F(DriverImpTest, givenMissingMetricApiDependenciesWhenInitializingDriverImpThenGlobalDriverHandleIsNull) { NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get(); - hwInfo.capabilityTable.levelZeroSupported = true; NEO::MockExecutionEnvironment mockExecutionEnvironment; const auto &productHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper(); @@ -776,7 +760,6 @@ TEST(DriverTest, givenProgramDebuggingEnvVarValue1WhenCreatingDriverThenEnablePr ze_result_t returnValue; NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get(); - hwInfo.capabilityTable.levelZeroSupported = true; NEO::MockDevice *neoDevice = NEO::MockDevice::createWithNewExecutionEnvironment(&hwInfo); NEO::DeviceVector devices; @@ -798,7 +781,6 @@ TEST(DriverTest, givenProgramDebuggingEnvVarValue2WhenCreatingDriverThenEnablePr ze_result_t returnValue; NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get(); - hwInfo.capabilityTable.levelZeroSupported = true; NEO::MockDevice *neoDevice = NEO::MockDevice::createWithNewExecutionEnvironment(&hwInfo); NEO::DeviceVector devices; @@ -822,7 +804,6 @@ TEST(DriverTest, givenBuiltinsAsyncInitEnabledWhenCreatingDriverThenMakeSureBuil ze_result_t returnValue; NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get(); - hwInfo.capabilityTable.levelZeroSupported = true; NEO::MockDevice *neoDevice = NEO::MockDevice::createWithNewExecutionEnvironment(&hwInfo); @@ -890,47 +871,6 @@ TEST(DriverTest, givenInvalidCompilerEnvironmentAndEnableProgramDebuggingWithVal ASSERT_EQ(nullptr, L0::globalDriver); } -struct DriverTestMultipleFamilySupport : public ::testing::Test { - void SetUp() override { - - VariableBackup mockDeviceFlagBackup(&NEO::MockDevice::createSingleDevice, false); - - deviceFactory = std::make_unique(numRootDevices, numSubDevices); - for (auto i = 0u; i < numRootDevices; i++) { - devices.push_back(std::unique_ptr(deviceFactory->rootDevices[i])); - if (i < numSupportedRootDevices) { - devices[i]->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.levelZeroSupported = true; - } else { - deviceFactory->rootDevices.erase(deviceFactory->rootDevices.begin() + i); - devices[i]->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.levelZeroSupported = false; - } - } - } - DebugManagerStateRestore restorer; - std::vector> devices; - std::unique_ptr deviceFactory; - const uint32_t numRootDevices = 3u; - const uint32_t numSubDevices = 2u; - const uint32_t numSupportedRootDevices = 2u; -}; - -TEST_F(DriverTestMultipleFamilySupport, whenInitializingDriverWithArrayOfDevicesThenDriverIsInitializedOnlyWithThoseSupported) { - - ze_result_t returnValue; - auto driverHandle = DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue); - EXPECT_NE(nullptr, driverHandle); - - L0::DriverHandleImp *driverHandleImp = reinterpret_cast(driverHandle); - EXPECT_EQ(numSupportedRootDevices, driverHandleImp->devices.size()); - - for (auto d : driverHandleImp->devices) { - EXPECT_TRUE(d->getNEODevice()->getHardwareInfo().capabilityTable.levelZeroSupported); - } - - delete driverHandle; - L0::globalDriver = nullptr; -} - TEST(MultiRootDeviceDriverTest, whenInitializingDriverHandleWithMultipleDevicesThenOrderInRootDeviceIndicesMatchesOrderInDeviceVector) { Mock driverHandle; for (auto &device : driverHandle.devices) { @@ -972,37 +912,6 @@ TEST(MultiSubDeviceDriverTest, whenInitializingDriverHandleWithMultipleDevicesWi EXPECT_EQ(0u, driverHandle.rootDeviceIndices[0]); } -struct DriverTestMultipleFamilyNoSupport : public ::testing::Test { - void SetUp() override { - - VariableBackup mockDeviceFlagBackup(&NEO::MockDevice::createSingleDevice, false); - - NEO::ExecutionEnvironment *executionEnvironment = new NEO::ExecutionEnvironment(); - executionEnvironment->prepareRootDeviceEnvironments(numRootDevices); - for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) { - executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(NEO::defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[i]->initGmm(); - } - - for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) { - devices.push_back(std::unique_ptr(NEO::MockDevice::createWithExecutionEnvironment(NEO::defaultHwInfo.get(), executionEnvironment, i))); - devices[i]->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.levelZeroSupported = false; - } - } - - DebugManagerStateRestore restorer; - std::vector> devices; - - const uint32_t numRootDevices = 3u; -}; - -TEST_F(DriverTestMultipleFamilyNoSupport, whenInitializingDriverWithArrayOfNotSupportedDevicesThenDriverIsNull) { - - ze_result_t returnValue; - auto driverHandle = DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue); - EXPECT_EQ(nullptr, driverHandle); -} - struct MaskArray { const std::string masks[4] = {"0", "1", "2", "3"}; // fixture has 4 subDevices }; @@ -1012,7 +921,6 @@ struct DriverHandleTest : public ::testing::Test { ze_result_t returnValue; NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get(); - hwInfo.capabilityTable.levelZeroSupported = true; NEO::MockDevice *neoDevice = NEO::MockDevice::createWithNewExecutionEnvironment(&hwInfo); NEO::DeviceVector devices; diff --git a/level_zero/sysman/source/driver/sysman_driver_handle_imp.cpp b/level_zero/sysman/source/driver/sysman_driver_handle_imp.cpp index bfdf648a4d..2ed3c90fd3 100644 --- a/level_zero/sysman/source/driver/sysman_driver_handle_imp.cpp +++ b/level_zero/sysman/source/driver/sysman_driver_handle_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -30,9 +30,6 @@ SysmanDriverHandleImp::SysmanDriverHandleImp() = default; ze_result_t SysmanDriverHandleImp::initialize(NEO::ExecutionEnvironment &executionEnvironment) { for (uint32_t rootDeviceIndex = 0u; rootDeviceIndex < executionEnvironment.rootDeviceEnvironments.size(); rootDeviceIndex++) { - if (!executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo()->capabilityTable.levelZeroSupported) { - continue; - } auto pSysmanDevice = SysmanDevice::create(executionEnvironment, rootDeviceIndex); if (pSysmanDevice != nullptr) { this->sysmanDevices.push_back(pSysmanDevice); diff --git a/level_zero/sysman/test/unit_tests/sources/linux/test_sysman_driver.cpp b/level_zero/sysman/test/unit_tests/sources/linux/test_sysman_driver.cpp index 19d49756d2..fc4f7ffe88 100644 --- a/level_zero/sysman/test/unit_tests/sources/linux/test_sysman_driver.cpp +++ b/level_zero/sysman/test/unit_tests/sources/linux/test_sysman_driver.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -68,87 +68,12 @@ TEST(zesInit, whenCallingZesDriverGetWithoutZesInitThenZesDriverGetCallNotSuccee EXPECT_EQ(ZE_RESULT_ERROR_UNINITIALIZED, zesDriverGet(&count, nullptr)); } -struct SysmanDriverTestMultipleFamilySupport : public ::testing::Test { - void SetUp() override { - executionEnvironment = new NEO::ExecutionEnvironment(); - executionEnvironment->prepareRootDeviceEnvironments(numRootDevices); - for (auto i = 0u; i < numRootDevices; i++) { - executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(NEO::defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[i]->osInterface = std::make_unique(); - executionEnvironment->rootDeviceEnvironments[i]->osInterface->setDriverModel(std::make_unique(*executionEnvironment->rootDeviceEnvironments[i])); - if (i < numSupportedRootDevices) { - executionEnvironment->rootDeviceEnvironments[i]->getMutableHardwareInfo()->capabilityTable.levelZeroSupported = true; - } else { - executionEnvironment->rootDeviceEnvironments[i]->getMutableHardwareInfo()->capabilityTable.levelZeroSupported = false; - } - } - } - - NEO::ExecutionEnvironment *executionEnvironment = nullptr; - const uint32_t numRootDevices = 3u; - const uint32_t numSubDevices = 2u; - const uint32_t numSupportedRootDevices = 2u; -}; - -TEST_F(SysmanDriverTestMultipleFamilySupport, whenInitializingSysmanDriverWithArrayOfDevicesThenDriverIsInitializedOnlyWithThoseSupported) { - VariableBackup mockRealPath(&NEO::SysCalls::sysCallsRealpath, [](const char *path, char *buf) -> char * { - constexpr size_t sizeofPath = sizeof("/sys/devices/pci0000:00/0000:00:02.0"); - strcpy_s(buf, sizeofPath, "/sys/devices/pci0000:00/0000:00:02.0"); - return buf; - }); - - VariableBackup mockReadLink(&NEO::SysCalls::sysCallsReadlink, [](const char *path, char *buf, size_t bufsize) -> int { - std::string str = "../../devices/pci0000:37/0000:37:01.0/0000:38:00.0/0000:39:01.0/0000:3a:00.0/drm/renderD128"; - std::memcpy(buf, str.c_str(), str.size()); - return static_cast(str.size()); - }); - - ze_result_t returnValue; - - auto driverHandle = L0::Sysman::SysmanDriverHandle::create(*executionEnvironment, &returnValue); - EXPECT_NE(nullptr, driverHandle); - - L0::Sysman::SysmanDriverHandleImp *driverHandleImp = reinterpret_cast(driverHandle); - EXPECT_EQ(numSupportedRootDevices, driverHandleImp->sysmanDevices.size()); - - for (auto d : driverHandleImp->sysmanDevices) { - EXPECT_TRUE(d->getHardwareInfo().capabilityTable.levelZeroSupported); - } - - delete driverHandle; - L0::Sysman::globalSysmanDriver = nullptr; -} - -struct SysmanDriverTestMultipleFamilyNoSupport : public ::testing::Test { - void SetUp() override { - executionEnvironment = new NEO::ExecutionEnvironment(); - executionEnvironment->prepareRootDeviceEnvironments(numRootDevices); - for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) { - executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(NEO::defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[i]->getMutableHardwareInfo()->capabilityTable.levelZeroSupported = false; - } - } - - NEO::ExecutionEnvironment *executionEnvironment = nullptr; - const uint32_t numRootDevices = 3u; -}; - -TEST_F(SysmanDriverTestMultipleFamilyNoSupport, whenInitializingSysmanDriverWithArrayOfNotSupportedDevicesThenDriverIsNull) { - ze_result_t returnValue; - this->executionEnvironment->incRefInternal(); - auto driverHandle = L0::Sysman::SysmanDriverHandle::create(*executionEnvironment, &returnValue); - EXPECT_EQ(nullptr, driverHandle); - EXPECT_EQ(returnValue, ZE_RESULT_ERROR_UNINITIALIZED); - this->executionEnvironment->decRefInternal(); -} - struct SysmanDriverTestNoDeviceCreate : public ::testing::Test { void SetUp() override { executionEnvironment = new NEO::ExecutionEnvironment(); executionEnvironment->prepareRootDeviceEnvironments(numRootDevices); for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) { executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(NEO::defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[i]->getMutableHardwareInfo()->capabilityTable.levelZeroSupported = true; executionEnvironment->rootDeviceEnvironments[i]->osInterface = std::make_unique(); executionEnvironment->rootDeviceEnvironments[i]->osInterface->setDriverModel(std::make_unique(*executionEnvironment->rootDeviceEnvironments[i])); } diff --git a/opencl/test/unit_test/ult_specific_config_ocl.cpp b/opencl/test/unit_test/ult_specific_config_ocl.cpp index 4a517940a9..0a9ad6145d 100644 --- a/opencl/test/unit_test/ult_specific_config_ocl.cpp +++ b/opencl/test/unit_test/ult_specific_config_ocl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -23,10 +23,6 @@ void cleanTestHelpers() { delete platformsImpl; } -bool isPlatformSupported(const HardwareInfo &hwInfoForTests) { - return true; -} - void setupTestFiles(std::string testBinaryFiles, int32_t revId) { testBinaryFiles.append("/"); testBinaryFiles.append(binaryNameSuffix); diff --git a/shared/source/gen12lp/hw_info_adln.cpp b/shared/source/gen12lp/hw_info_adln.cpp index 12fee9eeac..db63c8ebb1 100644 --- a/shared/source/gen12lp/hw_info_adln.cpp +++ b/shared/source/gen12lp/hw_info_adln.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2024 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -72,7 +72,6 @@ const RuntimeCapabilityTable ADLN::capabilityTable{ false, // supportsOnDemandPageFaults false, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled - true, // levelZeroSupported true, // isIntegratedDevice true, // supportsMediaBlock false, // p2pAccessSupported diff --git a/shared/source/gen12lp/hw_info_adlp.cpp b/shared/source/gen12lp/hw_info_adlp.cpp index 4b98e6f9b4..765160fd85 100644 --- a/shared/source/gen12lp/hw_info_adlp.cpp +++ b/shared/source/gen12lp/hw_info_adlp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -72,7 +72,6 @@ const RuntimeCapabilityTable ADLP::capabilityTable{ false, // supportsOnDemandPageFaults false, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled - true, // levelZeroSupported true, // isIntegratedDevice true, // supportsMediaBlock false, // p2pAccessSupported diff --git a/shared/source/gen12lp/hw_info_adls.cpp b/shared/source/gen12lp/hw_info_adls.cpp index ec9db2848a..1c5276fc2f 100644 --- a/shared/source/gen12lp/hw_info_adls.cpp +++ b/shared/source/gen12lp/hw_info_adls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2024 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -72,7 +72,6 @@ const RuntimeCapabilityTable ADLS::capabilityTable{ false, // supportsOnDemandPageFaults false, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled - true, // levelZeroSupported true, // isIntegratedDevice true, // supportsMediaBlock false, // p2pAccessSupported diff --git a/shared/source/gen12lp/hw_info_dg1.cpp b/shared/source/gen12lp/hw_info_dg1.cpp index 53b7ee99e5..874530b85e 100644 --- a/shared/source/gen12lp/hw_info_dg1.cpp +++ b/shared/source/gen12lp/hw_info_dg1.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2024 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -72,7 +72,6 @@ const RuntimeCapabilityTable DG1::capabilityTable{ false, // supportsOnDemandPageFaults false, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled - true, // levelZeroSupported false, // isIntegratedDevice true, // supportsMediaBlock true, // p2pAccessSupported diff --git a/shared/source/gen12lp/hw_info_rkl.cpp b/shared/source/gen12lp/hw_info_rkl.cpp index f9e70a182c..03612cc88c 100644 --- a/shared/source/gen12lp/hw_info_rkl.cpp +++ b/shared/source/gen12lp/hw_info_rkl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2024 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -72,7 +72,6 @@ const RuntimeCapabilityTable RKL::capabilityTable{ false, // supportsOnDemandPageFaults false, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled - true, // levelZeroSupported true, // isIntegratedDevice true, // supportsMediaBlock false, // p2pAccessSupported diff --git a/shared/source/gen12lp/hw_info_tgllp.cpp b/shared/source/gen12lp/hw_info_tgllp.cpp index 76ccf889ea..252c4549a7 100644 --- a/shared/source/gen12lp/hw_info_tgllp.cpp +++ b/shared/source/gen12lp/hw_info_tgllp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2024 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -72,7 +72,6 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{ false, // supportsOnDemandPageFaults false, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled - true, // levelZeroSupported true, // isIntegratedDevice true, // supportsMediaBlock false, // p2pAccessSupported diff --git a/shared/source/helpers/hw_info.h b/shared/source/helpers/hw_info.h index 9ed9c595e7..91c6ef68d5 100644 --- a/shared/source/helpers/hw_info.h +++ b/shared/source/helpers/hw_info.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -59,7 +59,6 @@ struct RuntimeCapabilityTable { bool supportsOnDemandPageFaults; bool supportsIndependentForwardProgress; bool hostPtrTrackingEnabled; - bool levelZeroSupported; bool isIntegratedDevice; bool supportsMediaBlock; bool p2pAccessSupported; @@ -126,7 +125,6 @@ inline bool operator==(const RuntimeCapabilityTable &lhs, const RuntimeCapabilit result &= (lhs.supportsOnDemandPageFaults == rhs.supportsOnDemandPageFaults); result &= (lhs.supportsIndependentForwardProgress == rhs.supportsIndependentForwardProgress); result &= (lhs.hostPtrTrackingEnabled == rhs.hostPtrTrackingEnabled); - result &= (lhs.levelZeroSupported == rhs.levelZeroSupported); result &= (lhs.isIntegratedDevice == rhs.isIntegratedDevice); result &= (lhs.supportsMediaBlock == rhs.supportsMediaBlock); result &= (lhs.fusedEuEnabled == rhs.fusedEuEnabled); diff --git a/shared/source/xe2_hpg_core/hw_info_bmg.cpp b/shared/source/xe2_hpg_core/hw_info_bmg.cpp index 87c69bf4ca..faa9de11be 100644 --- a/shared/source/xe2_hpg_core/hw_info_bmg.cpp +++ b/shared/source/xe2_hpg_core/hw_info_bmg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -75,7 +75,6 @@ const RuntimeCapabilityTable BMG::capabilityTable{ true, // supportsOnDemandPageFaults true, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled - true, // levelZeroSupported false, // isIntegratedDevice false, // supportsMediaBlock false, // p2pAccessSupported diff --git a/shared/source/xe2_hpg_core/hw_info_lnl.cpp b/shared/source/xe2_hpg_core/hw_info_lnl.cpp index 26a985c7ed..f48745af56 100644 --- a/shared/source/xe2_hpg_core/hw_info_lnl.cpp +++ b/shared/source/xe2_hpg_core/hw_info_lnl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -73,7 +73,6 @@ const RuntimeCapabilityTable LNL::capabilityTable{ true, // supportsOnDemandPageFaults true, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled - true, // levelZeroSupported true, // isIntegratedDevice false, // supportsMediaBlock false, // p2pAccessSupported diff --git a/shared/source/xe_hpc_core/hw_info_pvc.cpp b/shared/source/xe_hpc_core/hw_info_pvc.cpp index daafba040d..e3e9cdf19d 100644 --- a/shared/source/xe_hpc_core/hw_info_pvc.cpp +++ b/shared/source/xe_hpc_core/hw_info_pvc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -85,7 +85,6 @@ const RuntimeCapabilityTable PVC::capabilityTable{ true, // supportsOnDemandPageFaults true, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled - true, // levelZeroSupported false, // isIntegratedDevice false, // supportsMediaBlock true, // p2pAccessSupported diff --git a/shared/source/xe_hpg_core/hw_info_arl.cpp b/shared/source/xe_hpg_core/hw_info_arl.cpp index 6790dabc7f..28dbb9ef76 100644 --- a/shared/source/xe_hpg_core/hw_info_arl.cpp +++ b/shared/source/xe_hpg_core/hw_info_arl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -70,7 +70,6 @@ const RuntimeCapabilityTable ARL::capabilityTable{ false, // supportsOnDemandPageFaults false, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled - true, // levelZeroSupported true, // isIntegratedDevice true, // supportsMediaBlock false, // p2pAccessSupported diff --git a/shared/source/xe_hpg_core/hw_info_dg2.cpp b/shared/source/xe_hpg_core/hw_info_dg2.cpp index 48879f5a4d..01c20cccc3 100644 --- a/shared/source/xe_hpg_core/hw_info_dg2.cpp +++ b/shared/source/xe_hpg_core/hw_info_dg2.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -75,7 +75,6 @@ const RuntimeCapabilityTable DG2::capabilityTable{ false, // supportsOnDemandPageFaults false, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled - true, // levelZeroSupported false, // isIntegratedDevice true, // supportsMediaBlock true, // p2pAccessSupported diff --git a/shared/source/xe_hpg_core/hw_info_mtl.cpp b/shared/source/xe_hpg_core/hw_info_mtl.cpp index 94761687af..d949799d48 100644 --- a/shared/source/xe_hpg_core/hw_info_mtl.cpp +++ b/shared/source/xe_hpg_core/hw_info_mtl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2024 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -71,7 +71,6 @@ const RuntimeCapabilityTable MTL::capabilityTable{ false, // supportsOnDemandPageFaults false, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled - true, // levelZeroSupported true, // isIntegratedDevice true, // supportsMediaBlock false, // p2pAccessSupported diff --git a/shared/test/common/common_main.cpp b/shared/test/common/common_main.cpp index 0250dc1904..a1908632f7 100644 --- a/shared/test/common/common_main.cpp +++ b/shared/test/common/common_main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -77,7 +77,6 @@ extern PRODUCT_FAMILY productFamily; extern GFXCORE_FAMILY renderCoreFamily; void applyWorkarounds(); -bool isPlatformSupported(const HardwareInfo &hwInfoForTests); void setupTestFiles(std::string testBinaryFiles, int32_t revId); std::string getBaseExecutionDir(); void addUltListener(::testing::TestEventListeners &listener); @@ -342,12 +341,6 @@ int main(int argc, char **argv) { } adjustHwInfoForTests(hwInfoForTests, euPerSubSlice, sliceCount, subSlicePerSliceCount, dieRecovery); - // Platforms with uninitialized factory are not supported - if (!isPlatformSupported(hwInfoForTests)) { - std::cout << "unsupported product family has been set: " << NEO::hardwarePrefix[::productFamily] << std::endl; - std::cout << "skipping tests" << std::endl; - return 0; - } binaryNameSuffix = hardwarePrefix[hwInfoForTests.platform.eProductFamily]; diff --git a/shared/test/unit_test/gen12lp/adln/test_product_helper_adln.cpp b/shared/test/unit_test/gen12lp/adln/test_product_helper_adln.cpp index 4383a2932f..3bc23e978d 100644 --- a/shared/test/unit_test/gen12lp/adln/test_product_helper_adln.cpp +++ b/shared/test/unit_test/gen12lp/adln/test_product_helper_adln.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2024 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -64,11 +64,6 @@ ADLNTEST_F(AdlnHwInfo, whenPlatformIsAdlnThenExpectSvmIsSet) { EXPECT_TRUE(hardwareInfo.capabilityTable.ftrSvm); } -ADLNTEST_F(AdlnHwInfo, givenAdlnWhenCheckL0ThenReturnTrue) { - const HardwareInfo &hardwareInfo = ADLN::hwInfo; - EXPECT_TRUE(hardwareInfo.capabilityTable.levelZeroSupported); -} - using AdlnProductHelper = ProductHelperTest; ADLNTEST_F(AdlnProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) { diff --git a/shared/test/unit_test/gen12lp/adlp/test_product_helper_adlp.cpp b/shared/test/unit_test/gen12lp/adlp/test_product_helper_adlp.cpp index c65858c29a..416c7faa8e 100644 --- a/shared/test/unit_test/gen12lp/adlp/test_product_helper_adlp.cpp +++ b/shared/test/unit_test/gen12lp/adlp/test_product_helper_adlp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -63,11 +63,6 @@ ADLPTEST_F(AdlpHwInfo, whenPlatformIsAdlpThenExpectSvmIsSet) { EXPECT_TRUE(hardwareInfo.capabilityTable.ftrSvm); } -ADLPTEST_F(AdlpHwInfo, givenAdlpWhenCheckL0ThenReturnTrue) { - const HardwareInfo &hardwareInfo = ADLP::hwInfo; - EXPECT_TRUE(hardwareInfo.capabilityTable.levelZeroSupported); -} - using AdlpProductHelper = ProductHelperTest; ADLPTEST_F(AdlpProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) { diff --git a/shared/test/unit_test/gen12lp/adls/test_product_helper_adls.cpp b/shared/test/unit_test/gen12lp/adls/test_product_helper_adls.cpp index 50ab6a9d23..d6f2c13197 100644 --- a/shared/test/unit_test/gen12lp/adls/test_product_helper_adls.cpp +++ b/shared/test/unit_test/gen12lp/adls/test_product_helper_adls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2024 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -63,11 +63,6 @@ ADLSTEST_F(AdlsHwInfo, whenPlatformIsAdlsThenExpectSvmIsSet) { EXPECT_TRUE(hardwareInfo.capabilityTable.ftrSvm); } -ADLSTEST_F(AdlsHwInfo, givenAdlsWhenCheckL0ThenReturnTrue) { - const HardwareInfo &hardwareInfo = ADLS::hwInfo; - EXPECT_TRUE(hardwareInfo.capabilityTable.levelZeroSupported); -} - using AdlsProductHelper = ProductHelperTest; ADLSTEST_F(AdlsProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) { diff --git a/shared/test/unit_test/gen12lp/rkl/test_product_helper_rkl.cpp b/shared/test/unit_test/gen12lp/rkl/test_product_helper_rkl.cpp index c1d25dc179..9eb6611928 100644 --- a/shared/test/unit_test/gen12lp/rkl/test_product_helper_rkl.cpp +++ b/shared/test/unit_test/gen12lp/rkl/test_product_helper_rkl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2024 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -73,11 +73,6 @@ RKLTEST_F(RklHwInfo, givenRklWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFa EXPECT_TRUE(hardwareInfo.capabilityTable.ftrSupportsInteger64BitAtomics); } -RKLTEST_F(RklHwInfo, givenRklWhenCheckL0ThenReturnTrue) { - const HardwareInfo &hardwareInfo = RKL::hwInfo; - EXPECT_TRUE(hardwareInfo.capabilityTable.levelZeroSupported); -} - using RklProductHelper = ProductHelperTest; RKLTEST_F(RklProductHelper, givenCompilerProductHelperWhenGetProductConfigThenCorrectMatchIsFound) { diff --git a/shared/test/unit_test/ult_specific_config.cpp b/shared/test/unit_test/ult_specific_config.cpp index b6d93c1ca1..db6ea392fc 100644 --- a/shared/test/unit_test/ult_specific_config.cpp +++ b/shared/test/unit_test/ult_specific_config.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -63,10 +63,6 @@ void applyWorkarounds() { } } -bool isPlatformSupported(const HardwareInfo &hwInfoForTests) { - return true; -} - void setupTestFiles(std::string testBinaryFiles, int32_t revId) { testBinaryFiles.append("/"); testBinaryFiles.append(binaryNameSuffix);