From 5619da6238210690f7074a07fe28700f99b375bf Mon Sep 17 00:00:00 2001 From: "Chodor, Jaroslaw" Date: Fri, 20 Dec 2024 17:29:21 +0000 Subject: [PATCH] feature: Adding hook for applying OpenVino-related AIL Related-To: NEO-12747 Signed-off-by: Chodor, Jaroslaw --- shared/offline_compiler/source/CMakeLists.txt | 7 ++++-- shared/source/ail/CMakeLists.txt | 3 ++- shared/source/ail/ail_configuration.h | 7 +++--- shared/source/ail/ail_configuration_base.inl | 4 ++-- shared/source/ail/ail_configuration_extra.cpp | 10 ++++----- shared/source/ail/ail_ov_comp_wa.h | 15 +++++++++++++ shared/source/ail/linux/CMakeLists.txt | 3 ++- .../source/ail/linux/ail_ov_comp_wa_linux.cpp | 15 +++++++++++++ shared/source/ail/windows/CMakeLists.txt | 3 ++- .../ail/windows/ail_ov_comp_wa_windows.cpp | 15 +++++++++++++ .../xe3_core/ptl/ail_configuration_ptl.cpp | 6 +++++ .../xe_hpg_core/arl/ail_configuration_arl.cpp | 6 ++--- .../xe_hpg_core/dg2/ail_configuration_dg2.cpp | 4 ++-- .../xe_hpg_core/mtl/ail_configuration_mtl.cpp | 6 ++--- .../root_device_environment.cpp | 4 ++-- .../common/mocks/mock_ail_configuration.h | 4 ++-- shared/test/unit_test/ail/CMakeLists.txt | 4 ++-- shared/test/unit_test/ail/ail_tests.cpp | 12 +++++----- .../test/unit_test/ail/linux/CMakeLists.txt | 3 ++- .../ail/linux/ail_linux_tests_ov_comp_wa.cpp | 22 +++++++++++++++++++ .../test/unit_test/ail/windows/CMakeLists.txt | 3 ++- .../windows/ail_windows_tests_ov_comp_wa.cpp | 22 +++++++++++++++++++ .../xe_hpg_core/arl/ail_tests_arl.cpp | 13 ++++++----- .../xe_hpg_core/mtl/ail_tests_mtl.cpp | 13 ++++++----- 24 files changed, 156 insertions(+), 48 deletions(-) create mode 100644 shared/source/ail/ail_ov_comp_wa.h create mode 100644 shared/source/ail/linux/ail_ov_comp_wa_linux.cpp create mode 100644 shared/source/ail/windows/ail_ov_comp_wa_windows.cpp create mode 100644 shared/test/unit_test/ail/linux/ail_linux_tests_ov_comp_wa.cpp create mode 100644 shared/test/unit_test/ail/windows/ail_windows_tests_ov_comp_wa.cpp diff --git a/shared/offline_compiler/source/CMakeLists.txt b/shared/offline_compiler/source/CMakeLists.txt index dbc97c4b97..1a75acc56d 100644 --- a/shared/offline_compiler/source/CMakeLists.txt +++ b/shared/offline_compiler/source/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2020-2024 Intel Corporation +# Copyright (C) 2020-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -19,7 +19,8 @@ set(CLOC_LIB_SRCS_LIB ${NEO_SHARED_DIRECTORY}/ail/ail_configuration.h ${NEO_SHARED_DIRECTORY}/ail/ail_configuration.cpp ${NEO_SHARED_DIRECTORY}/ail${BRANCH_DIR_SUFFIX}ail_configuration_extra.cpp - ${NEO_SHARED_DIRECTORY}/ail//ail_configuration_base.inl + ${NEO_SHARED_DIRECTORY}/ail/ail_configuration_base.inl + ${NEO_SHARED_DIRECTORY}/ail/ail_ov_comp_wa.h ${NEO_SHARED_DIRECTORY}/compiler_interface/compiler_options.cpp ${NEO_SHARED_DIRECTORY}/compiler_interface/compiler_options.h ${NEO_SHARED_DIRECTORY}/compiler_interface/compiler_options_extra.h @@ -152,6 +153,7 @@ if(WIN32) ${NEO_SHARED_DIRECTORY}/helpers/windows/path.cpp ${NEO_SHARED_DIRECTORY}/os_interface/windows/sys_calls.cpp ${NEO_SHARED_DIRECTORY}/utilities/windows/directory.cpp + ${NEO_SHARED_DIRECTORY}/ail/windows${BRANCH_DIR_SUFFIX}/ail_ov_comp_wa_windows.cpp ${OCLOC_DIRECTORY}/source/windows/ocloc_supported_devices_helper_windows.cpp ) else() @@ -167,6 +169,7 @@ else() ${NEO_SHARED_DIRECTORY}/helpers/linux/path.cpp ${NEO_SHARED_DIRECTORY}/os_interface/linux/sys_calls_linux.cpp ${NEO_SHARED_DIRECTORY}/utilities/linux/directory.cpp + ${NEO_SHARED_DIRECTORY}/ail/linux/ail_ov_comp_wa_linux.cpp ${OCLOC_DIRECTORY}/source/linux/os_library_ocloc_helper.cpp ${OCLOC_DIRECTORY}/source/linux/ocloc_supported_devices_helper_linux.cpp ) diff --git a/shared/source/ail/CMakeLists.txt b/shared/source/ail/CMakeLists.txt index ddcc7f413b..2c8dc662c3 100644 --- a/shared/source/ail/CMakeLists.txt +++ b/shared/source/ail/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2021-2024 Intel Corporation +# Copyright (C) 2021-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -11,6 +11,7 @@ set(NEO_CORE_AIL ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}ail_configuration_extra.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ail_configuration_base.inl ${CMAKE_CURRENT_SOURCE_DIR}/ail_configuration_tgllp_and_later.inl + ${CMAKE_CURRENT_SOURCE_DIR}/ail_ov_comp_wa.h ) set_property(GLOBAL PROPERTY NEO_CORE_AIL ${NEO_CORE_AIL}) diff --git a/shared/source/ail/ail_configuration.h b/shared/source/ail/ail_configuration.h index 93caa011ce..a0d17487dd 100644 --- a/shared/source/ail/ail_configuration.h +++ b/shared/source/ail/ail_configuration.h @@ -32,6 +32,7 @@ namespace NEO { extern const char legacyPlatformName[]; +struct HardwareInfo; struct RuntimeCapabilityTable; enum class AILEnumeration : uint32_t { @@ -62,7 +63,7 @@ class AILConfiguration { MOCKABLE_VIRTUAL bool initProcessExecutableName(); - virtual void apply(RuntimeCapabilityTable &runtimeCapabilityTable); + virtual void apply(HardwareInfo &hwInfo); virtual void modifyKernelIfRequired(std::string &kernel) = 0; @@ -95,7 +96,7 @@ class AILConfiguration { virtual uint32_t getMicrosecondResolution() = 0; protected: - virtual void applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) = 0; + virtual void applyExt(HardwareInfo &hwInfo) = 0; std::string processName; bool sourcesContain(const std::string &sources, std::string_view contentToFind) const; @@ -124,7 +125,7 @@ class AILConfigurationHw : public AILConfiguration { return ailConfiguration; } - void applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) override; + void applyExt(HardwareInfo &hwInfo) override; void modifyKernelIfRequired(std::string &kernel) override; bool isContextSyncFlagRequired() override; diff --git a/shared/source/ail/ail_configuration_base.inl b/shared/source/ail/ail_configuration_base.inl index 0ff8410575..6915bb5095 100644 --- a/shared/source/ail/ail_configuration_base.inl +++ b/shared/source/ail/ail_configuration_base.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2024 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,7 +16,7 @@ inline void AILConfigurationHw::modifyKernelIfRequired(std::string &ker } template -inline void AILConfigurationHw::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) { +inline void AILConfigurationHw::applyExt(HardwareInfo &hwInfo) { } template diff --git a/shared/source/ail/ail_configuration_extra.cpp b/shared/source/ail/ail_configuration_extra.cpp index d2103a38df..e62f2dee38 100644 --- a/shared/source/ail/ail_configuration_extra.cpp +++ b/shared/source/ail/ail_configuration_extra.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -50,17 +50,17 @@ const uint32_t microsecondAdjustment = 1000; AILConfigurationCreateFunctionType ailConfigurationFactory[IGFX_MAX_PRODUCT]; -void AILConfiguration::apply(RuntimeCapabilityTable &runtimeCapabilityTable) { +void AILConfiguration::apply(HardwareInfo &hwInfo) { auto search = applicationMap.find(processName); if (search != applicationMap.end()) { for (size_t i = 0; i < search->second.size(); ++i) { switch (search->second[i]) { case AILEnumeration::enableFp64: - runtimeCapabilityTable.ftrSupportsFP64 = true; + hwInfo.capabilityTable.ftrSupportsFP64 = true; break; case AILEnumeration::enableLegacyPlatformName: - runtimeCapabilityTable.preferredPlatformName = legacyPlatformName; + hwInfo.capabilityTable.preferredPlatformName = legacyPlatformName; break; default: break; @@ -68,7 +68,7 @@ void AILConfiguration::apply(RuntimeCapabilityTable &runtimeCapabilityTable) { } } - applyExt(runtimeCapabilityTable); + applyExt(hwInfo); } } // namespace NEO diff --git a/shared/source/ail/ail_ov_comp_wa.h b/shared/source/ail/ail_ov_comp_wa.h new file mode 100644 index 0000000000..c68ed5dd91 --- /dev/null +++ b/shared/source/ail/ail_ov_comp_wa.h @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2025 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#pragma once + +namespace NEO { +struct HardwareInfo; + +bool applyOpenVinoCompatibilityWaIfNeeded(HardwareInfo &hwInfo); + +} // namespace NEO diff --git a/shared/source/ail/linux/CMakeLists.txt b/shared/source/ail/linux/CMakeLists.txt index 970e5b3a3a..2b1038d37e 100644 --- a/shared/source/ail/linux/CMakeLists.txt +++ b/shared/source/ail/linux/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2021 Intel Corporation +# Copyright (C) 2021-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -7,6 +7,7 @@ set(NEO_CORE_AIL_LINUX ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/ail_configuration_linux.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ail_ov_comp_wa_linux.cpp ) set_property(GLOBAL PROPERTY NEO_CORE_AIL_LINUX ${NEO_CORE_AIL_LINUX}) diff --git a/shared/source/ail/linux/ail_ov_comp_wa_linux.cpp b/shared/source/ail/linux/ail_ov_comp_wa_linux.cpp new file mode 100644 index 0000000000..511ece5a52 --- /dev/null +++ b/shared/source/ail/linux/ail_ov_comp_wa_linux.cpp @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2025 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +namespace NEO { +struct HardwareInfo; + +bool applyOpenVinoCompatibilityWaIfNeeded(HardwareInfo &hwInfo) { + return false; +} + +} // namespace NEO diff --git a/shared/source/ail/windows/CMakeLists.txt b/shared/source/ail/windows/CMakeLists.txt index da6e74e5a8..596b8a7420 100644 --- a/shared/source/ail/windows/CMakeLists.txt +++ b/shared/source/ail/windows/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2021 Intel Corporation +# Copyright (C) 2021-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -7,6 +7,7 @@ set(NEO_CORE_AIL_WINDOWS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/ail_configuration_windows.cpp + ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/ail_ov_comp_wa_windows.cpp ) set_property(GLOBAL PROPERTY NEO_CORE_AIL_WINDOWS ${NEO_CORE_AIL_WINDOWS}) diff --git a/shared/source/ail/windows/ail_ov_comp_wa_windows.cpp b/shared/source/ail/windows/ail_ov_comp_wa_windows.cpp new file mode 100644 index 0000000000..511ece5a52 --- /dev/null +++ b/shared/source/ail/windows/ail_ov_comp_wa_windows.cpp @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2025 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +namespace NEO { +struct HardwareInfo; + +bool applyOpenVinoCompatibilityWaIfNeeded(HardwareInfo &hwInfo) { + return false; +} + +} // namespace NEO diff --git a/shared/source/ail/xe3_core/ptl/ail_configuration_ptl.cpp b/shared/source/ail/xe3_core/ptl/ail_configuration_ptl.cpp index 1a3c08e50d..3eabd6adea 100644 --- a/shared/source/ail/xe3_core/ptl/ail_configuration_ptl.cpp +++ b/shared/source/ail/xe3_core/ptl/ail_configuration_ptl.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/ail/ail_configuration_base.inl" +#include "shared/source/ail/ail_ov_comp_wa.h" #include #include @@ -15,6 +16,11 @@ static EnableAIL enableAILPTL; std::map> applicationMapPTL = {}; +template <> +void AILConfigurationHw::applyExt(HardwareInfo &hwInfo) { + applyOpenVinoCompatibilityWaIfNeeded(hwInfo); +} + template class AILConfigurationHw; } // namespace NEO diff --git a/shared/source/ail/xe_hpg_core/arl/ail_configuration_arl.cpp b/shared/source/ail/xe_hpg_core/arl/ail_configuration_arl.cpp index bb07dab55a..70b6f4724a 100644 --- a/shared/source/ail/xe_hpg_core/arl/ail_configuration_arl.cpp +++ b/shared/source/ail/xe_hpg_core/arl/ail_configuration_arl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -22,13 +22,13 @@ std::map> applicationMapARL = {{"s static EnableAIL enableAILARL; template <> -void AILConfigurationHw::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) { +void AILConfigurationHw::applyExt(HardwareInfo &hwInfo) { auto search = applicationMapARL.find(processName); if (search != applicationMapARL.end()) { for (size_t i = 0; i < search->second.size(); ++i) { switch (search->second[i]) { case AILEnumeration::disableDirectSubmission: - runtimeCapabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported = false; + hwInfo.capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported = false; default: break; } diff --git a/shared/source/ail/xe_hpg_core/dg2/ail_configuration_dg2.cpp b/shared/source/ail/xe_hpg_core/dg2/ail_configuration_dg2.cpp index 2fb72887fc..5c0a59919c 100644 --- a/shared/source/ail/xe_hpg_core/dg2/ail_configuration_dg2.cpp +++ b/shared/source/ail/xe_hpg_core/dg2/ail_configuration_dg2.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -57,7 +57,7 @@ bool AILConfigurationHw::useLegacyValidationLogic() { } template <> -inline void AILConfigurationHw::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) { +inline void AILConfigurationHw::applyExt(HardwareInfo &hwInfo) { auto search = applicationsForceRcsDg2.find(processName); if (search != applicationsForceRcsDg2.end()) { shouldForceRcs = true; diff --git a/shared/source/ail/xe_hpg_core/mtl/ail_configuration_mtl.cpp b/shared/source/ail/xe_hpg_core/mtl/ail_configuration_mtl.cpp index 0139e84528..fb50b420f5 100644 --- a/shared/source/ail/xe_hpg_core/mtl/ail_configuration_mtl.cpp +++ b/shared/source/ail/xe_hpg_core/mtl/ail_configuration_mtl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2024 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -28,13 +28,13 @@ constexpr std::array applicationsLegacyValidationPathMtl = "blender", "bforartists", "cycles"}; template <> -void AILConfigurationHw::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) { +void AILConfigurationHw::applyExt(HardwareInfo &hwInfo) { auto search = applicationMapMTL.find(processName); if (search != applicationMapMTL.end()) { for (size_t i = 0; i < search->second.size(); ++i) { switch (search->second[i]) { case AILEnumeration::disableDirectSubmission: - runtimeCapabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported = false; + hwInfo.capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported = false; default: break; } diff --git a/shared/source/execution_environment/root_device_environment.cpp b/shared/source/execution_environment/root_device_environment.cpp index 8f323c1ea0..53288acbd1 100644 --- a/shared/source/execution_environment/root_device_environment.cpp +++ b/shared/source/execution_environment/root_device_environment.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2024 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -113,7 +113,7 @@ bool RootDeviceEnvironment::initAilConfiguration() { return false; } - ailConfiguration->apply(hwInfo->capabilityTable); + ailConfiguration->apply(*hwInfo); return true; } diff --git a/shared/test/common/mocks/mock_ail_configuration.h b/shared/test/common/mocks/mock_ail_configuration.h index d18b1bbe47..7e296f63a0 100644 --- a/shared/test/common/mocks/mock_ail_configuration.h +++ b/shared/test/common/mocks/mock_ail_configuration.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -89,7 +89,7 @@ class MockAILConfiguration : public AILConfiguration { uint32_t mockMicrosecondResolution = 1000u; protected: - void applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) override {} + void applyExt(HardwareInfo &hwInfo) override {} }; template diff --git a/shared/test/unit_test/ail/CMakeLists.txt b/shared/test/unit_test/ail/CMakeLists.txt index df04da2897..ea832dde8c 100644 --- a/shared/test/unit_test/ail/CMakeLists.txt +++ b/shared/test/unit_test/ail/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2021-2024 Intel Corporation +# Copyright (C) 2021-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -9,4 +9,4 @@ target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ail_tests.cpp ) -add_subdirectories() \ No newline at end of file +add_subdirectories() diff --git a/shared/test/unit_test/ail/ail_tests.cpp b/shared/test/unit_test/ail/ail_tests.cpp index 2887b4da48..c29dd150b8 100644 --- a/shared/test/unit_test/ail/ail_tests.cpp +++ b/shared/test/unit_test/ail/ail_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -25,10 +25,11 @@ HWTEST2_F(AILTests, givenInitilizedTemplateWhenApplyWithBlenderIsCalledThenFP64S AILWhitebox ail; ail.processName = "blender"; - NEO::RuntimeCapabilityTable rtTable = {}; + HardwareInfo hwInfo = {}; + NEO::RuntimeCapabilityTable &rtTable = hwInfo.capabilityTable; rtTable.ftrSupportsFP64 = false; - ail.apply(rtTable); + ail.apply(hwInfo); EXPECT_EQ(rtTable.ftrSupportsFP64, true); } @@ -37,10 +38,11 @@ HWTEST2_F(AILTests, givenInitilizedTemplateWhenApplyWithAdobePremiereProIsCalled AILWhitebox ail; ail.processName = "Adobe Premiere Pro"; - NEO::RuntimeCapabilityTable rtTable = {}; + HardwareInfo hwInfo = {}; + NEO::RuntimeCapabilityTable &rtTable = hwInfo.capabilityTable; rtTable.preferredPlatformName = nullptr; - ail.apply(rtTable); + ail.apply(hwInfo); EXPECT_NE(nullptr, rtTable.preferredPlatformName); EXPECT_STREQ("Intel(R) OpenCL", rtTable.preferredPlatformName); diff --git a/shared/test/unit_test/ail/linux/CMakeLists.txt b/shared/test/unit_test/ail/linux/CMakeLists.txt index d40fbc3f7f..3fb1452522 100644 --- a/shared/test/unit_test/ail/linux/CMakeLists.txt +++ b/shared/test/unit_test/ail/linux/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2021-2022 Intel Corporation +# Copyright (C) 2021-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -8,5 +8,6 @@ if(UNIX) target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/ail_linux_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ail_linux_tests_ov_comp_wa.cpp ) endif() \ No newline at end of file diff --git a/shared/test/unit_test/ail/linux/ail_linux_tests_ov_comp_wa.cpp b/shared/test/unit_test/ail/linux/ail_linux_tests_ov_comp_wa.cpp new file mode 100644 index 0000000000..03daf904a0 --- /dev/null +++ b/shared/test/unit_test/ail/linux/ail_linux_tests_ov_comp_wa.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2025 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/ail/ail_ov_comp_wa.h" +#include "shared/source/helpers/hw_info.h" +#include "shared/test/common/helpers/unit_test_helper.h" + +#include "gtest/gtest.h" + +namespace NEO { +using AILTests = ::testing::Test; + +TEST(AILTests, WhenCallingApplyOpenvinoCompatibilityWaIfNeededIsCalledThenReturnFalse) { + HardwareInfo hwInfo = {}; + EXPECT_FALSE(NEO::applyOpenVinoCompatibilityWaIfNeeded(hwInfo)); +} + +} // namespace NEO diff --git a/shared/test/unit_test/ail/windows/CMakeLists.txt b/shared/test/unit_test/ail/windows/CMakeLists.txt index a5025fc9bb..05dd8c4a7d 100644 --- a/shared/test/unit_test/ail/windows/CMakeLists.txt +++ b/shared/test/unit_test/ail/windows/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2021-2022 Intel Corporation +# Copyright (C) 2021-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -8,5 +8,6 @@ if(WIN32) target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/ail_windows_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/ail_windows_tests_ov_comp_wa.cpp ) endif() \ No newline at end of file diff --git a/shared/test/unit_test/ail/windows/ail_windows_tests_ov_comp_wa.cpp b/shared/test/unit_test/ail/windows/ail_windows_tests_ov_comp_wa.cpp new file mode 100644 index 0000000000..03daf904a0 --- /dev/null +++ b/shared/test/unit_test/ail/windows/ail_windows_tests_ov_comp_wa.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2025 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/ail/ail_ov_comp_wa.h" +#include "shared/source/helpers/hw_info.h" +#include "shared/test/common/helpers/unit_test_helper.h" + +#include "gtest/gtest.h" + +namespace NEO { +using AILTests = ::testing::Test; + +TEST(AILTests, WhenCallingApplyOpenvinoCompatibilityWaIfNeededIsCalledThenReturnFalse) { + HardwareInfo hwInfo = {}; + EXPECT_FALSE(NEO::applyOpenVinoCompatibilityWaIfNeeded(hwInfo)); +} + +} // namespace NEO diff --git a/shared/test/unit_test/xe_hpg_core/arl/ail_tests_arl.cpp b/shared/test/unit_test/xe_hpg_core/arl/ail_tests_arl.cpp index 7a8825f62f..addf33c0ca 100644 --- a/shared/test/unit_test/xe_hpg_core/arl/ail_tests_arl.cpp +++ b/shared/test/unit_test/xe_hpg_core/arl/ail_tests_arl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,23 +16,24 @@ using AILTestsARL = ::testing::Test; HWTEST2_F(AILTestsARL, givenArlWhenSvchostAppIsDetectedThenDisableDirectSubmission, IsARL) { AILWhitebox ail; - auto capabilityTable = defaultHwInfo->capabilityTable; + HardwareInfo hwInfo = *defaultHwInfo; + auto &capabilityTable = hwInfo.capabilityTable; auto defaultEngineSupportedValue = capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported; ail.processName = "UnknownProcess"; - ail.apply(capabilityTable); + ail.apply(hwInfo); EXPECT_EQ(defaultEngineSupportedValue, capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported); ail.processName = "svchost"; - ail.apply(capabilityTable); + ail.apply(hwInfo); EXPECT_FALSE(capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported); ail.processName = "aomhost64"; - ail.apply(capabilityTable); + ail.apply(hwInfo); EXPECT_FALSE(capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported); ail.processName = "Zoom"; - ail.apply(capabilityTable); + ail.apply(hwInfo); EXPECT_FALSE(capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported); } diff --git a/shared/test/unit_test/xe_hpg_core/mtl/ail_tests_mtl.cpp b/shared/test/unit_test/xe_hpg_core/mtl/ail_tests_mtl.cpp index 03fb17d31e..24029bf729 100644 --- a/shared/test/unit_test/xe_hpg_core/mtl/ail_tests_mtl.cpp +++ b/shared/test/unit_test/xe_hpg_core/mtl/ail_tests_mtl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,23 +16,24 @@ using AILTestsMTL = ::testing::Test; HWTEST2_F(AILTestsMTL, givenMtlWhenSvchostAppIsDetectedThenDisableDirectSubmission, IsMTL) { AILWhitebox ail; - auto capabilityTable = defaultHwInfo->capabilityTable; + HardwareInfo hwInfo = *defaultHwInfo; + auto &capabilityTable = hwInfo.capabilityTable; auto defaultEngineSupportedValue = capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported; ail.processName = "UnknownProcess"; - ail.apply(capabilityTable); + ail.apply(hwInfo); EXPECT_EQ(defaultEngineSupportedValue, capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported); ail.processName = "svchost"; - ail.apply(capabilityTable); + ail.apply(hwInfo); EXPECT_FALSE(capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported); ail.processName = "aomhost64"; - ail.apply(capabilityTable); + ail.apply(hwInfo); EXPECT_FALSE(capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported); ail.processName = "Zoom"; - ail.apply(capabilityTable); + ail.apply(hwInfo); EXPECT_FALSE(capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_CCS].engineSupported); }