From 5c7875bbb968ed4624cbf3a2cebbf68d80f86b00 Mon Sep 17 00:00:00 2001 From: "Kulkarni, Ashwin Kumar" Date: Wed, 15 Nov 2023 13:58:28 +0000 Subject: [PATCH] feature(sysman): adds sysman product helper for all supported platforms Related-To: NEO-8720 Signed-off-by: Kulkarni, Ashwin Kumar --- .../linux/product_helper/gen11/CMakeLists.txt | 7 +++ .../product_helper/gen11/icllp/CMakeLists.txt | 13 ++++ .../enable_sysman_product_helper_icllp.cpp | 17 +++++ .../product_helper/gen12lp/CMakeLists.txt | 7 +++ .../gen12lp/adln/CMakeLists.txt | 13 ++++ .../enable_sysman_product_helper_adln.cpp | 17 +++++ .../gen12lp/adlp/CMakeLists.txt | 13 ++++ .../enable_sysman_product_helper_adlp.cpp | 17 +++++ .../gen12lp/adls/CMakeLists.txt | 13 ++++ .../enable_sysman_product_helper_adls.cpp | 17 +++++ .../{ => gen12lp}/dg1/CMakeLists.txt | 2 +- .../dg1/enable_sysman_product_helper_dg1.cpp | 1 - .../dg1/sysman_product_helper_dg1.cpp | 4 +- .../product_helper/gen12lp/rkl/CMakeLists.txt | 13 ++++ .../rkl/enable_sysman_product_helper_rkl.cpp | 17 +++++ .../gen12lp/tgllp/CMakeLists.txt | 13 ++++ .../enable_sysman_product_helper_tgllp.cpp | 17 +++++ .../linux/product_helper/gen9/CMakeLists.txt | 7 +++ .../product_helper/gen9/cfl/CMakeLists.txt | 13 ++++ .../cfl/enable_sysman_product_helper_cfl.cpp | 17 +++++ .../product_helper/gen9/kbl/CMakeLists.txt | 13 ++++ .../kbl/enable_sysman_product_helper_kbl.cpp | 17 +++++ .../product_helper/gen9/skl/CMakeLists.txt | 13 ++++ .../skl/enable_sysman_product_helper_skl.cpp | 17 +++++ .../product_helper/sysman_product_helper.h | 2 +- .../product_helper/xe_hpc_core/CMakeLists.txt | 7 +++ .../{ => xe_hpc_core}/pvc/CMakeLists.txt | 2 +- .../pvc/enable_sysman_product_helper_pvc.cpp | 3 +- .../pvc/sysman_product_helper_pvc.cpp | 4 +- .../product_helper/xe_hpg_core/CMakeLists.txt | 7 +++ .../xe_hpg_core/arl/CMakeLists.txt | 13 ++++ .../arl/enable_sysman_product_helper_arl.cpp | 17 +++++ .../{ => xe_hpg_core}/dg2/CMakeLists.txt | 2 +- .../dg2/enable_sysman_product_helper_dg2.cpp | 3 +- .../dg2/sysman_product_helper_dg2.cpp | 4 +- .../xe_hpg_core/mtl/CMakeLists.txt | 13 ++++ .../mtl/enable_sysman_product_helper_mtl.cpp | 17 +++++ .../memory/linux/test_sysman_memory.cpp | 31 ---------- .../sources/shared/linux/CMakeLists.txt | 1 + .../linux/product_helper/CMakeLists.txt | 13 ++++ .../sysman_product_helper_tests.cpp | 62 +++++++++++++++++++ 41 files changed, 450 insertions(+), 49 deletions(-) create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen11/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/enable_sysman_product_helper_icllp.cpp create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen12lp/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen12lp/adln/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen12lp/adln/enable_sysman_product_helper_adln.cpp create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen12lp/adlp/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen12lp/adlp/enable_sysman_product_helper_adlp.cpp create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen12lp/adls/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen12lp/adls/enable_sysman_product_helper_adls.cpp rename level_zero/sysman/source/shared/linux/product_helper/{ => gen12lp}/dg1/CMakeLists.txt (100%) rename level_zero/sysman/source/shared/linux/product_helper/{ => gen12lp}/dg1/enable_sysman_product_helper_dg1.cpp (81%) rename level_zero/sysman/source/shared/linux/product_helper/{ => gen12lp}/dg1/sysman_product_helper_dg1.cpp (82%) create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen12lp/rkl/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen12lp/rkl/enable_sysman_product_helper_rkl.cpp create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen12lp/tgllp/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen12lp/tgllp/enable_sysman_product_helper_tgllp.cpp create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen9/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/enable_sysman_product_helper_cfl.cpp create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/enable_sysman_product_helper_kbl.cpp create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen9/skl/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/gen9/skl/enable_sysman_product_helper_skl.cpp create mode 100644 level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/CMakeLists.txt rename level_zero/sysman/source/shared/linux/product_helper/{ => xe_hpc_core}/pvc/CMakeLists.txt (100%) rename level_zero/sysman/source/shared/linux/product_helper/{ => xe_hpc_core}/pvc/enable_sysman_product_helper_pvc.cpp (78%) rename level_zero/sysman/source/shared/linux/product_helper/{ => xe_hpc_core}/pvc/sysman_product_helper_pvc.cpp (86%) create mode 100644 level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/arl/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/arl/enable_sysman_product_helper_arl.cpp rename level_zero/sysman/source/shared/linux/product_helper/{ => xe_hpg_core}/dg2/CMakeLists.txt (100%) rename level_zero/sysman/source/shared/linux/product_helper/{ => xe_hpg_core}/dg2/enable_sysman_product_helper_dg2.cpp (78%) rename level_zero/sysman/source/shared/linux/product_helper/{ => xe_hpg_core}/dg2/sysman_product_helper_dg2.cpp (82%) create mode 100644 level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/mtl/CMakeLists.txt create mode 100644 level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/mtl/enable_sysman_product_helper_mtl.cpp create mode 100644 level_zero/sysman/test/unit_tests/sources/shared/linux/product_helper/CMakeLists.txt create mode 100644 level_zero/sysman/test/unit_tests/sources/shared/linux/product_helper/sysman_product_helper_tests.cpp diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen11/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen11/CMakeLists.txt new file mode 100644 index 0000000000..9bed0cbd91 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen11/CMakeLists.txt @@ -0,0 +1,7 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +add_subdirectories() diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/CMakeLists.txt new file mode 100644 index 0000000000..8edc3e5569 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(SUPPORT_ICLLP) + target_sources(${L0_STATIC_LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_icllp.cpp + ) +endif() + diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/enable_sysman_product_helper_icllp.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/enable_sysman_product_helper_icllp.cpp new file mode 100644 index 0000000000..9a70de7a48 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/enable_sysman_product_helper_icllp.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" + +namespace L0 { +namespace Sysman { + +static EnableSysmanProductHelper enableICL_LP; + +} // namespace Sysman +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen12lp/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/CMakeLists.txt new file mode 100644 index 0000000000..9bed0cbd91 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/CMakeLists.txt @@ -0,0 +1,7 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +add_subdirectories() diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adln/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adln/CMakeLists.txt new file mode 100644 index 0000000000..98f2ef7722 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adln/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(SUPPORT_ADLN) + target_sources(${L0_STATIC_LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_adln.cpp + ) +endif() + diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adln/enable_sysman_product_helper_adln.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adln/enable_sysman_product_helper_adln.cpp new file mode 100644 index 0000000000..e7f200c886 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adln/enable_sysman_product_helper_adln.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" + +namespace L0 { +namespace Sysman { + +static EnableSysmanProductHelper enableADLN; + +} // namespace Sysman +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adlp/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adlp/CMakeLists.txt new file mode 100644 index 0000000000..f5adfa8557 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adlp/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(SUPPORT_ADLP) + target_sources(${L0_STATIC_LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_adlp.cpp + ) +endif() + diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adlp/enable_sysman_product_helper_adlp.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adlp/enable_sysman_product_helper_adlp.cpp new file mode 100644 index 0000000000..6f1877c9ff --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adlp/enable_sysman_product_helper_adlp.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" + +namespace L0 { +namespace Sysman { + +static EnableSysmanProductHelper enableADLP; + +} // namespace Sysman +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adls/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adls/CMakeLists.txt new file mode 100644 index 0000000000..5e78def41a --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adls/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(SUPPORT_ADLS) + target_sources(${L0_STATIC_LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_adls.cpp + ) +endif() + diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adls/enable_sysman_product_helper_adls.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adls/enable_sysman_product_helper_adls.cpp new file mode 100644 index 0000000000..e5685c3ed1 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/adls/enable_sysman_product_helper_adls.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" + +namespace L0 { +namespace Sysman { + +static EnableSysmanProductHelper enableADL_S; + +} // namespace Sysman +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/dg1/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/dg1/CMakeLists.txt similarity index 100% rename from level_zero/sysman/source/shared/linux/product_helper/dg1/CMakeLists.txt rename to level_zero/sysman/source/shared/linux/product_helper/gen12lp/dg1/CMakeLists.txt index d46dcc231f..3d22a779a3 100644 --- a/level_zero/sysman/source/shared/linux/product_helper/dg1/CMakeLists.txt +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/dg1/CMakeLists.txt @@ -7,8 +7,8 @@ if(SUPPORT_DG1) target_sources(${L0_STATIC_LIB_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_dg1.cpp ${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_dg1.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_dg1.cpp ) endif() diff --git a/level_zero/sysman/source/shared/linux/product_helper/dg1/enable_sysman_product_helper_dg1.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/dg1/enable_sysman_product_helper_dg1.cpp similarity index 81% rename from level_zero/sysman/source/shared/linux/product_helper/dg1/enable_sysman_product_helper_dg1.cpp rename to level_zero/sysman/source/shared/linux/product_helper/gen12lp/dg1/enable_sysman_product_helper_dg1.cpp index 43e4f7a059..47d751e46b 100644 --- a/level_zero/sysman/source/shared/linux/product_helper/dg1/enable_sysman_product_helper_dg1.cpp +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/dg1/enable_sysman_product_helper_dg1.cpp @@ -5,7 +5,6 @@ * */ -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper.h" #include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" #include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" diff --git a/level_zero/sysman/source/shared/linux/product_helper/dg1/sysman_product_helper_dg1.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/dg1/sysman_product_helper_dg1.cpp similarity index 82% rename from level_zero/sysman/source/shared/linux/product_helper/dg1/sysman_product_helper_dg1.cpp rename to level_zero/sysman/source/shared/linux/product_helper/gen12lp/dg1/sysman_product_helper_dg1.cpp index 309a522131..6d39cc24eb 100644 --- a/level_zero/sysman/source/shared/linux/product_helper/dg1/sysman_product_helper_dg1.cpp +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/dg1/sysman_product_helper_dg1.cpp @@ -5,12 +5,10 @@ * */ -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper.h" #include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" namespace L0 { namespace Sysman { - constexpr static auto gfxProduct = IGFX_DG1; template <> @@ -19,4 +17,4 @@ ze_result_t SysmanProductHelperHw::getMemoryProperties(zes_mem_prope } } // namespace Sysman -} // namespace L0 \ No newline at end of file +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen12lp/rkl/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/rkl/CMakeLists.txt new file mode 100644 index 0000000000..dc301f5faa --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/rkl/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(SUPPORT_RKL) + target_sources(${L0_STATIC_LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_rkl.cpp + ) +endif() + diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen12lp/rkl/enable_sysman_product_helper_rkl.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/rkl/enable_sysman_product_helper_rkl.cpp new file mode 100644 index 0000000000..af4e497c16 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/rkl/enable_sysman_product_helper_rkl.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" + +namespace L0 { +namespace Sysman { + +static EnableSysmanProductHelper enableRKL; + +} // namespace Sysman +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen12lp/tgllp/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/tgllp/CMakeLists.txt new file mode 100644 index 0000000000..f7e5e5f8ca --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/tgllp/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(SUPPORT_TGLLP) + target_sources(${L0_STATIC_LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_tgllp.cpp + ) +endif() + diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen12lp/tgllp/enable_sysman_product_helper_tgllp.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/tgllp/enable_sysman_product_helper_tgllp.cpp new file mode 100644 index 0000000000..4ca1e385fd --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen12lp/tgllp/enable_sysman_product_helper_tgllp.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" + +namespace L0 { +namespace Sysman { + +static EnableSysmanProductHelper enableTGL_LP; + +} // namespace Sysman +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen9/CMakeLists.txt new file mode 100644 index 0000000000..9bed0cbd91 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen9/CMakeLists.txt @@ -0,0 +1,7 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +add_subdirectories() diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/CMakeLists.txt new file mode 100644 index 0000000000..999fcf98b0 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(SUPPORT_CFL) + target_sources(${L0_STATIC_LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_cfl.cpp + ) +endif() + diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/enable_sysman_product_helper_cfl.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/enable_sysman_product_helper_cfl.cpp new file mode 100644 index 0000000000..affcd619b6 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/enable_sysman_product_helper_cfl.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" + +namespace L0 { +namespace Sysman { + +static EnableSysmanProductHelper enableCFL; + +} // namespace Sysman +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/CMakeLists.txt new file mode 100644 index 0000000000..e769bed72d --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(SUPPORT_KBL) + target_sources(${L0_STATIC_LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_kbl.cpp + ) +endif() + diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/enable_sysman_product_helper_kbl.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/enable_sysman_product_helper_kbl.cpp new file mode 100644 index 0000000000..93f7bc9fc0 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/enable_sysman_product_helper_kbl.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" + +namespace L0 { +namespace Sysman { + +static EnableSysmanProductHelper enableKBL; + +} // namespace Sysman +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/CMakeLists.txt new file mode 100644 index 0000000000..b98ab638e8 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(SUPPORT_SKL) + target_sources(${L0_STATIC_LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_skl.cpp + ) +endif() + diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/enable_sysman_product_helper_skl.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/enable_sysman_product_helper_skl.cpp new file mode 100644 index 0000000000..f4454efb48 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/enable_sysman_product_helper_skl.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" + +namespace L0 { +namespace Sysman { + +static EnableSysmanProductHelper enableSKL; + +} // namespace Sysman +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper.h b/level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper.h index 055ab21a41..5322116bc5 100644 --- a/level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper.h +++ b/level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper.h @@ -43,4 +43,4 @@ class SysmanProductHelper { }; } // namespace Sysman -} // namespace L0 \ No newline at end of file +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/CMakeLists.txt new file mode 100644 index 0000000000..9bed0cbd91 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/CMakeLists.txt @@ -0,0 +1,7 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +add_subdirectories() diff --git a/level_zero/sysman/source/shared/linux/product_helper/pvc/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/pvc/CMakeLists.txt similarity index 100% rename from level_zero/sysman/source/shared/linux/product_helper/pvc/CMakeLists.txt rename to level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/pvc/CMakeLists.txt index 73d5034e30..df2a897afc 100644 --- a/level_zero/sysman/source/shared/linux/product_helper/pvc/CMakeLists.txt +++ b/level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/pvc/CMakeLists.txt @@ -7,7 +7,7 @@ if(SUPPORT_PVC) target_sources(${L0_STATIC_LIB_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_pvc.cpp ${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_pvc.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_pvc.cpp ) endif() diff --git a/level_zero/sysman/source/shared/linux/product_helper/pvc/enable_sysman_product_helper_pvc.cpp b/level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/pvc/enable_sysman_product_helper_pvc.cpp similarity index 78% rename from level_zero/sysman/source/shared/linux/product_helper/pvc/enable_sysman_product_helper_pvc.cpp rename to level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/pvc/enable_sysman_product_helper_pvc.cpp index d00d7855db..f62ced35b6 100644 --- a/level_zero/sysman/source/shared/linux/product_helper/pvc/enable_sysman_product_helper_pvc.cpp +++ b/level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/pvc/enable_sysman_product_helper_pvc.cpp @@ -5,7 +5,6 @@ * */ -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper.h" #include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" #include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" @@ -15,4 +14,4 @@ namespace Sysman { static EnableSysmanProductHelper enablePVC; } // namespace Sysman -} // namespace L0 \ No newline at end of file +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/pvc/sysman_product_helper_pvc.cpp b/level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/pvc/sysman_product_helper_pvc.cpp similarity index 86% rename from level_zero/sysman/source/shared/linux/product_helper/pvc/sysman_product_helper_pvc.cpp rename to level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/pvc/sysman_product_helper_pvc.cpp index b81a514295..bbbdbbc5e4 100644 --- a/level_zero/sysman/source/shared/linux/product_helper/pvc/sysman_product_helper_pvc.cpp +++ b/level_zero/sysman/source/shared/linux/product_helper/xe_hpc_core/pvc/sysman_product_helper_pvc.cpp @@ -5,12 +5,10 @@ * */ -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper.h" #include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" namespace L0 { namespace Sysman { - constexpr static auto gfxProduct = IGFX_PVC; template <> @@ -24,4 +22,4 @@ ze_result_t SysmanProductHelperHw::getMemoryBandwidth(zes_mem_bandwi } } // namespace Sysman -} // namespace L0 \ No newline at end of file +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/CMakeLists.txt new file mode 100644 index 0000000000..9bed0cbd91 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/CMakeLists.txt @@ -0,0 +1,7 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +add_subdirectories() diff --git a/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/arl/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/arl/CMakeLists.txt new file mode 100644 index 0000000000..6c2ddb9b22 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/arl/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(SUPPORT_ARL) + target_sources(${L0_STATIC_LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_arl.cpp + ) +endif() + diff --git a/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/arl/enable_sysman_product_helper_arl.cpp b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/arl/enable_sysman_product_helper_arl.cpp new file mode 100644 index 0000000000..3e147cf135 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/arl/enable_sysman_product_helper_arl.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" + +namespace L0 { +namespace Sysman { + +static EnableSysmanProductHelper enableARL; + +} // namespace Sysman +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/dg2/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/dg2/CMakeLists.txt similarity index 100% rename from level_zero/sysman/source/shared/linux/product_helper/dg2/CMakeLists.txt rename to level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/dg2/CMakeLists.txt index a358d4a48a..c8bfa641d2 100644 --- a/level_zero/sysman/source/shared/linux/product_helper/dg2/CMakeLists.txt +++ b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/dg2/CMakeLists.txt @@ -7,8 +7,8 @@ if(SUPPORT_DG2) target_sources(${L0_STATIC_LIB_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_dg2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_dg2.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_dg2.cpp ) endif() diff --git a/level_zero/sysman/source/shared/linux/product_helper/dg2/enable_sysman_product_helper_dg2.cpp b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/dg2/enable_sysman_product_helper_dg2.cpp similarity index 78% rename from level_zero/sysman/source/shared/linux/product_helper/dg2/enable_sysman_product_helper_dg2.cpp rename to level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/dg2/enable_sysman_product_helper_dg2.cpp index e19d4ee1ee..9a375513b9 100644 --- a/level_zero/sysman/source/shared/linux/product_helper/dg2/enable_sysman_product_helper_dg2.cpp +++ b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/dg2/enable_sysman_product_helper_dg2.cpp @@ -5,7 +5,6 @@ * */ -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper.h" #include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" #include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" @@ -15,4 +14,4 @@ namespace Sysman { static EnableSysmanProductHelper enableDG2; } // namespace Sysman -} // namespace L0 \ No newline at end of file +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/dg2/sysman_product_helper_dg2.cpp b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/dg2/sysman_product_helper_dg2.cpp similarity index 82% rename from level_zero/sysman/source/shared/linux/product_helper/dg2/sysman_product_helper_dg2.cpp rename to level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/dg2/sysman_product_helper_dg2.cpp index 051389cbb6..744e98637e 100644 --- a/level_zero/sysman/source/shared/linux/product_helper/dg2/sysman_product_helper_dg2.cpp +++ b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/dg2/sysman_product_helper_dg2.cpp @@ -5,12 +5,10 @@ * */ -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper.h" #include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" namespace L0 { namespace Sysman { - constexpr static auto gfxProduct = IGFX_DG2; template <> @@ -19,4 +17,4 @@ ze_result_t SysmanProductHelperHw::getMemoryBandwidth(zes_mem_bandwi } } // namespace Sysman -} // namespace L0 \ No newline at end of file +} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/mtl/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/mtl/CMakeLists.txt new file mode 100644 index 0000000000..62781a8e39 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/mtl/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(SUPPORT_MTL) + target_sources(${L0_STATIC_LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_mtl.cpp + ) +endif() + diff --git a/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/mtl/enable_sysman_product_helper_mtl.cpp b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/mtl/enable_sysman_product_helper_mtl.cpp new file mode 100644 index 0000000000..8f578f0692 --- /dev/null +++ b/level_zero/sysman/source/shared/linux/product_helper/xe_hpg_core/mtl/enable_sysman_product_helper_mtl.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" + +namespace L0 { +namespace Sysman { + +static EnableSysmanProductHelper enableMTL; + +} // namespace Sysman +} // namespace L0 diff --git a/level_zero/sysman/test/unit_tests/sources/memory/linux/test_sysman_memory.cpp b/level_zero/sysman/test/unit_tests/sources/memory/linux/test_sysman_memory.cpp index 039ba4f023..5d2ad4a8c2 100644 --- a/level_zero/sysman/test/unit_tests/sources/memory/linux/test_sysman_memory.cpp +++ b/level_zero/sysman/test/unit_tests/sources/memory/linux/test_sysman_memory.cpp @@ -6,7 +6,6 @@ */ #include "level_zero/sysman/source/device/sysman_device_imp.h" -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper.h" #include "level_zero/sysman/test/unit_tests/sources/linux/mock_sysman_fixture.h" #include "level_zero/sysman/test/unit_tests/sources/memory/linux/mock_memory.h" @@ -49,36 +48,6 @@ class SysmanDeviceMemoryFixture : public SysmanDeviceFixture { L0::Sysman::SysmanDevice *device = nullptr; }; -HWTEST2_F(SysmanDeviceMemoryFixture, GivenSysmanProductHelperInstanceWhenCallingMemoryAPIsThenErrorIsReturned, IsPVC) { - auto pSysmanProductHelper = L0::Sysman::SysmanProductHelper::create(defaultHwInfo->platform.eProductFamily); - zes_mem_properties_t properties; - ze_result_t result = pSysmanProductHelper->getMemoryProperties(&properties, static_cast(pLinuxSysmanImp)); - EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); - zes_mem_bandwidth_t bandwidth; - result = pSysmanProductHelper->getMemoryBandwidth(&bandwidth, static_cast(pLinuxSysmanImp)); - EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); -} - -HWTEST2_F(SysmanDeviceMemoryFixture, GivenSysmanProductHelperInstanceWhenCallingMemoryAPIsThenErrorIsReturned, IsDG1) { - auto pSysmanProductHelper = L0::Sysman::SysmanProductHelper::create(defaultHwInfo->platform.eProductFamily); - zes_mem_properties_t properties; - ze_result_t result = pSysmanProductHelper->getMemoryProperties(&properties, static_cast(pLinuxSysmanImp)); - EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); - zes_mem_bandwidth_t bandwidth; - result = pSysmanProductHelper->getMemoryBandwidth(&bandwidth, static_cast(pLinuxSysmanImp)); - EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); -} - -HWTEST2_F(SysmanDeviceMemoryFixture, GivenSysmanProductHelperInstanceWhenCallingMemoryAPIsThenErrorIsReturned, IsDG2) { - auto pSysmanProductHelper = L0::Sysman::SysmanProductHelper::create(defaultHwInfo->platform.eProductFamily); - zes_mem_properties_t properties; - ze_result_t result = pSysmanProductHelper->getMemoryProperties(&properties, static_cast(pLinuxSysmanImp)); - EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); - zes_mem_bandwidth_t bandwidth; - result = pSysmanProductHelper->getMemoryBandwidth(&bandwidth, static_cast(pLinuxSysmanImp)); - EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); -} - TEST_F(SysmanDeviceMemoryFixture, GivenComponentCountZeroWhenEnumeratingMemoryModulesWithLocalMemorySupportThenValidCountIsReturned) { setLocalSupportedAndReinit(false); uint32_t count = 0; diff --git a/level_zero/sysman/test/unit_tests/sources/shared/linux/CMakeLists.txt b/level_zero/sysman/test/unit_tests/sources/shared/linux/CMakeLists.txt index b0e18d3c7e..a5a3970262 100644 --- a/level_zero/sysman/test/unit_tests/sources/shared/linux/CMakeLists.txt +++ b/level_zero/sysman/test/unit_tests/sources/shared/linux/CMakeLists.txt @@ -16,4 +16,5 @@ if(UNIX) ${L0_SYSMAN_SHARED_TESTS} ) endif() +add_subdirectories() diff --git a/level_zero/sysman/test/unit_tests/sources/shared/linux/product_helper/CMakeLists.txt b/level_zero/sysman/test/unit_tests/sources/shared/linux/product_helper/CMakeLists.txt new file mode 100644 index 0000000000..4062de823e --- /dev/null +++ b/level_zero/sysman/test/unit_tests/sources/shared/linux/product_helper/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2020-2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(UNIX) + target_sources(${TARGET_NAME} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_tests.cpp + ) +endif() + diff --git a/level_zero/sysman/test/unit_tests/sources/shared/linux/product_helper/sysman_product_helper_tests.cpp b/level_zero/sysman/test/unit_tests/sources/shared/linux/product_helper/sysman_product_helper_tests.cpp new file mode 100644 index 0000000000..7319632cda --- /dev/null +++ b/level_zero/sysman/test/unit_tests/sources/shared/linux/product_helper/sysman_product_helper_tests.cpp @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/sysman/source/device/sysman_device_imp.h" +#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper.h" +#include "level_zero/sysman/test/unit_tests/sources/linux/mock_sysman_fixture.h" + +namespace L0 { +namespace Sysman { +namespace ult { + +struct SysmanProductHelperTest : public SysmanDeviceFixture { + void SetUp() override { + SysmanDeviceFixture::SetUp(); + } + void TearDown() override { + SysmanDeviceFixture::TearDown(); + } +}; + +HWTEST2_F(SysmanProductHelperTest, GivenSysmanProductHelperInstanceWhenCallingMemoryAPIsThenErrorIsReturned, IsPVC) { + auto pSysmanProductHelper = L0::Sysman::SysmanProductHelper::create(defaultHwInfo->platform.eProductFamily); + zes_mem_properties_t properties; + ze_result_t result = pSysmanProductHelper->getMemoryProperties(&properties, static_cast(pLinuxSysmanImp)); + EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); + zes_mem_bandwidth_t bandwidth; + result = pSysmanProductHelper->getMemoryBandwidth(&bandwidth, static_cast(pLinuxSysmanImp)); + EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); +} + +HWTEST2_F(SysmanProductHelperTest, GivenSysmanProductHelperInstanceWhenCallingMemoryAPIsThenErrorIsReturned, IsDG1) { + auto pSysmanProductHelper = L0::Sysman::SysmanProductHelper::create(defaultHwInfo->platform.eProductFamily); + zes_mem_properties_t properties; + ze_result_t result = pSysmanProductHelper->getMemoryProperties(&properties, static_cast(pLinuxSysmanImp)); + EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); + zes_mem_bandwidth_t bandwidth; + result = pSysmanProductHelper->getMemoryBandwidth(&bandwidth, static_cast(pLinuxSysmanImp)); + EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); +} + +HWTEST2_F(SysmanProductHelperTest, GivenSysmanProductHelperInstanceWhenCallingMemoryAPIsThenErrorIsReturned, IsDG2) { + auto pSysmanProductHelper = L0::Sysman::SysmanProductHelper::create(defaultHwInfo->platform.eProductFamily); + zes_mem_properties_t properties; + ze_result_t result = pSysmanProductHelper->getMemoryProperties(&properties, static_cast(pLinuxSysmanImp)); + EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); + zes_mem_bandwidth_t bandwidth; + result = pSysmanProductHelper->getMemoryBandwidth(&bandwidth, static_cast(pLinuxSysmanImp)); + EXPECT_EQ(result, ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); +} + +TEST_F(SysmanProductHelperTest, GivenInvalidProductFamilyWhenCallingProductHelperCreateThenNullPtrIsReturned) { + auto pSysmanProductHelper = L0::Sysman::SysmanProductHelper::create(IGFX_UNKNOWN); + EXPECT_EQ(nullptr, pSysmanProductHelper); +} + +} // namespace ult +} // namespace Sysman +} // namespace L0 \ No newline at end of file