diff --git a/level_zero/core/test/unit_tests/sources/device/CMakeLists.txt b/level_zero/core/test/unit_tests/sources/device/CMakeLists.txt index 27105da6b8..64ae14dfcd 100644 --- a/level_zero/core/test/unit_tests/sources/device/CMakeLists.txt +++ b/level_zero/core/test/unit_tests/sources/device/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2020 Intel Corporation +# Copyright (C) 2020-2021 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -8,3 +8,4 @@ target_sources(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/test_device.cpp ) +add_subdirectories() diff --git a/level_zero/core/test/unit_tests/xe_hp_core/test_device_xe_hp_core.cpp b/level_zero/core/test/unit_tests/xe_hp_core/test_device_xe_hp_core.cpp index 2fec86c462..95013e8f73 100644 --- a/level_zero/core/test/unit_tests/xe_hp_core/test_device_xe_hp_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hp_core/test_device_xe_hp_core.cpp @@ -22,6 +22,16 @@ HWTEST2_F(DeviceFixtureXeHpCore, GivenTargetXeHpCoreaWhenGettingMemoryProperties EXPECT_EQ(0, strcmp(memProperties.name, "HBM")); } +HWTEST2_F(DeviceFixtureXeHpCore, givenReturnedDevicePropertiesThenExpectedPropertyFlagsSet, IsXeHpCore) { + ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES}; + + device->getProperties(&deviceProps); + EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING); + EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_ECC); + EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE); + EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_INTEGRATED); +} + using DeviceQueueGroupTest = Test; HWTEST2_F(DeviceQueueGroupTest, givenNoBlitterSupportAndNoCCSThenOneQueueGroupIsReturned, IsXeHpCore) { diff --git a/level_zero/core/test/unit_tests/xe_hpg_core/test_device_xe_hpg_core.cpp b/level_zero/core/test/unit_tests/xe_hpg_core/test_device_xe_hpg_core.cpp index 6b7211864c..c72931db54 100644 --- a/level_zero/core/test/unit_tests/xe_hpg_core/test_device_xe_hpg_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hpg_core/test_device_xe_hpg_core.cpp @@ -122,5 +122,19 @@ HWTEST2_F(DeviceCopyQueueGroupTest, } } +using TestDeviceXeHpgCore = Test; +HWTEST2_F(TestDeviceXeHpgCore, givenReturnedDevicePropertiesThenExpectedPropertyFlagsSet, IsXeHpgCore) { + ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES}; + + device->getProperties(&deviceProps); + EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING); + EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_ECC); + EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE); + if (defaultHwInfo->capabilityTable.isIntegratedDevice) { + EXPECT_EQ(ZE_DEVICE_PROPERTY_FLAG_INTEGRATED, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_INTEGRATED); + } else { + EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_INTEGRATED); + } +} } // namespace ult } // namespace L0