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 92d96ba4f5..000a2eb0c6 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 @@ -151,6 +151,11 @@ bool HwHelperHw::disableL3CacheForDebug(const HardwareInfo &) const { return true; } +template <> +inline bool HwHelperHw::isLinuxCompletionFenceSupported() const { + return true; +} + template class HwHelperHw; template class FlatBatchBufferHelperHw; template struct MemorySynchronizationCommands; diff --git a/shared/test/common/xe_hp_core/xehp/CMakeLists.txt b/shared/test/common/xe_hp_core/xehp/CMakeLists.txt index a89b85a4fd..6bf7641027 100644 --- a/shared/test/common/xe_hp_core/xehp/CMakeLists.txt +++ b/shared/test/common/xe_hp_core/xehp/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2021 Intel Corporation +# Copyright (C) 2021-2022 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -7,7 +7,6 @@ if(TESTS_XE_HP_SDV) set(NEO_CORE_TESTS_XE_HP_CORE_XEHP ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_helper_xehp.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_xehp.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_xehp.cpp ) diff --git a/shared/test/unit_test/xe_hp_core/CMakeLists.txt b/shared/test/unit_test/xe_hp_core/CMakeLists.txt index 7cdf58aa39..316e83f199 100644 --- a/shared/test/unit_test/xe_hp_core/CMakeLists.txt +++ b/shared/test/unit_test/xe_hp_core/CMakeLists.txt @@ -9,6 +9,7 @@ if(TESTS_XE_HP_CORE) ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_xe_hp_core.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_xe_hp_core_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_xe_hp_core_tests.cpp ) if(DEFINED AUB_STREAM_PROJECT_NAME) diff --git a/shared/test/common/xe_hp_core/xehp/test_hw_helper_xehp.cpp b/shared/test/unit_test/xe_hp_core/hw_helper_xe_hp_core_tests.cpp similarity index 70% rename from shared/test/common/xe_hp_core/xehp/test_hw_helper_xehp.cpp rename to shared/test/unit_test/xe_hp_core/hw_helper_xe_hp_core_tests.cpp index 13b06e8a10..e4239acea9 100644 --- a/shared/test/common/xe_hp_core/xehp/test_hw_helper_xehp.cpp +++ b/shared/test/unit_test/xe_hp_core/hw_helper_xe_hp_core_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,9 +11,9 @@ #include "shared/test/common/test_macros/test.h" using namespace NEO; -using HwHelperTestXeHP = ::testing::Test; +using HwHelperXeHpCoreTest = ::testing::Test; -XEHPTEST_F(HwHelperTestXeHP, givenSteppingAorBWhenCheckingSipWAThenTrueIsReturned) { +XE_HP_CORE_TEST_F(HwHelperXeHpCoreTest, givenSteppingAorBWhenCheckingSipWAThenTrueIsReturned) { HardwareInfo hwInfo = *defaultHwInfo; auto renderCoreFamily = defaultHwInfo->platform.eRenderCoreFamily; auto productFamily = defaultHwInfo->platform.eProductFamily; @@ -28,7 +28,7 @@ XEHPTEST_F(HwHelperTestXeHP, givenSteppingAorBWhenCheckingSipWAThenTrueIsReturne EXPECT_TRUE(helper.isSipWANeeded(hwInfo)); } -XEHPTEST_F(HwHelperTestXeHP, givenSteppingCWhenCheckingSipWAThenFalseIsReturned) { +XE_HP_CORE_TEST_F(HwHelperXeHpCoreTest, givenSteppingCWhenCheckingSipWAThenFalseIsReturned) { HardwareInfo hwInfo = *defaultHwInfo; auto renderCoreFamily = defaultHwInfo->platform.eRenderCoreFamily; auto productFamily = defaultHwInfo->platform.eProductFamily; @@ -39,3 +39,8 @@ XEHPTEST_F(HwHelperTestXeHP, givenSteppingCWhenCheckingSipWAThenFalseIsReturned) hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_C, hwInfo); EXPECT_FALSE(helper.isSipWANeeded(hwInfo)); } + +XE_HP_CORE_TEST_F(HwHelperXeHpCoreTest, givenHwHelperWhenGettingLinuxCompletionFenceSupportThenTrueIsReturned) { + auto &hwHelper = NEO::HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily); + EXPECT_TRUE(hwHelper.isLinuxCompletionFenceSupported()); +}