Skip to content

Commit 37c78b9

Browse files
Disable bliter on DG1 Linux
move dg1 hw info config tests to shared Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
1 parent c52223e commit 37c78b9

File tree

9 files changed

+110
-29
lines changed

9 files changed

+110
-29
lines changed

opencl/test/unit_test/gen12lp/dg1/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2021 Intel Corporation
2+
# Copyright (C) 2020-2022 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
@@ -15,7 +15,6 @@ if(TESTS_DG1)
1515
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
1616
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_dg1.cpp
1717
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_tests_dg1.cpp
18-
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg1.cpp
1918
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_dg1.cpp
2019
${CMAKE_CURRENT_SOURCE_DIR}/execution_environment_tests_dg1.cpp
2120
)

shared/source/gen12lp/os_agnostic_hw_info_config_dg1.inl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -52,11 +52,6 @@ bool HwInfoConfigHw<gfxProduct>::isStorageInfoAdjustmentRequired() const {
5252
return true;
5353
}
5454

55-
template <>
56-
bool HwInfoConfigHw<gfxProduct>::obtainBlitterPreference(const HardwareInfo &hwInfo) const {
57-
return true;
58-
}
59-
6055
template <>
6156
bool HwInfoConfigHw<gfxProduct>::overrideGfxPartitionLayoutForWsl() const {
6257
return true;

shared/source/gen12lp/windows/hw_info_config_dg1.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -21,5 +21,10 @@ void HwInfoConfigHw<gfxProduct>::setCapabilityCoherencyFlag(const HardwareInfo &
2121
coherencyFlag = false;
2222
}
2323

24+
template <>
25+
bool HwInfoConfigHw<gfxProduct>::obtainBlitterPreference(const HardwareInfo &hwInfo) const {
26+
return true;
27+
}
28+
2429
template class HwInfoConfigHw<gfxProduct>;
2530
} // namespace NEO
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (C) 2022 Intel Corporation
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
7+
if(TESTS_DG1)
8+
target_sources(neo_shared_tests PRIVATE
9+
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
10+
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg1.cpp
11+
)
12+
add_subdirectories()
13+
endif()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (C) 2022 Intel Corporation
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
7+
if(LINUX)
8+
target_sources(neo_shared_tests PRIVATE
9+
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
10+
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg1_linux.cpp
11+
)
12+
add_subdirectories()
13+
endif()
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (C) 2022 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "shared/source/os_interface/hw_info_config.h"
9+
#include "shared/test/common/helpers/default_hw_info.h"
10+
#include "shared/test/common/test_macros/test.h"
11+
12+
using namespace NEO;
13+
14+
using Dg1HwInfoConfigLinux = ::testing::Test;
15+
16+
DG1TEST_F(Dg1HwInfoConfigLinux, whenConfigureHwInfoThenBlitterSupportIsDisabled) {
17+
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
18+
auto hardwareInfo = *defaultHwInfo;
19+
20+
hardwareInfo.capabilityTable.blitterOperationsSupported = false;
21+
hwInfoConfig.configureHardwareCustom(&hardwareInfo, nullptr);
22+
23+
EXPECT_FALSE(hardwareInfo.capabilityTable.blitterOperationsSupported);
24+
}
25+
26+
DG1TEST_F(Dg1HwInfoConfigLinux, givenDg1WhenObtainingBlitterPreferenceThenReturnFalse) {
27+
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
28+
const auto &hardwareInfo = DG1::hwInfo;
29+
30+
EXPECT_TRUE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
31+
}

opencl/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp renamed to shared/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020-2021 Intel Corporation
2+
* Copyright (C) 2020-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -10,8 +10,6 @@
1010
#include "shared/test/common/helpers/default_hw_info.h"
1111
#include "shared/test/common/test_macros/test.h"
1212

13-
#include "opencl/source/helpers/hardware_commands_helper.h"
14-
1513
using namespace NEO;
1614

1715
using Dg1HwInfoConfig = ::testing::Test;
@@ -107,30 +105,13 @@ DG1TEST_F(Dg1HwInfo, whenPlatformIsDg1ThenExpectSvmIsSet) {
107105
EXPECT_TRUE(hardwareInfo.capabilityTable.ftrSvm);
108106
}
109107

110-
DG1TEST_F(Dg1HwInfo, givenDg1WhenObtainingBlitterPreferenceThenReturnTrue) {
111-
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
112-
const auto &hardwareInfo = DG1::hwInfo;
113-
114-
EXPECT_TRUE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
115-
}
116-
117108
DG1TEST_F(Dg1HwInfo, givenDg1WhenObtainingFullBlitterSupportThenReturnFalse) {
118109
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
119110
const auto &hardwareInfo = DG1::hwInfo;
120111

121112
EXPECT_FALSE(hwInfoConfig.isBlitterFullySupported(hardwareInfo));
122113
}
123114

124-
DG1TEST_F(Dg1HwInfo, whenConfigureHwInfoThenBlitterSupportIsEnabled) {
125-
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
126-
auto hardwareInfo = *defaultHwInfo;
127-
128-
hardwareInfo.capabilityTable.blitterOperationsSupported = false;
129-
hwInfoConfig.configureHardwareCustom(&hardwareInfo, nullptr);
130-
131-
EXPECT_TRUE(hardwareInfo.capabilityTable.blitterOperationsSupported);
132-
}
133-
134115
DG1TEST_F(Dg1HwInfo, whenOverrideGfxPartitionLayoutForWslThenReturnTrue) {
135116
auto hwInfoConfig = HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
136117
EXPECT_TRUE(hwInfoConfig->overrideGfxPartitionLayoutForWsl());
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (C) 2022 Intel Corporation
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
7+
if(WIN32)
8+
target_sources(neo_shared_tests PRIVATE
9+
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
10+
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg1_windows.cpp
11+
)
12+
add_subdirectories()
13+
endif()
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (C) 2022 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "shared/source/os_interface/hw_info_config.h"
9+
#include "shared/test/common/helpers/default_hw_info.h"
10+
#include "shared/test/common/test_macros/test.h"
11+
12+
using namespace NEO;
13+
14+
using Dg1HwInfoConfigWindows = ::testing::Test;
15+
16+
DG1TEST_F(Dg1HwInfoConfigWindows, whenConfigureHwInfoThenBlitterSupportIsEnabled) {
17+
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
18+
auto hardwareInfo = *defaultHwInfo;
19+
20+
hardwareInfo.capabilityTable.blitterOperationsSupported = false;
21+
hwInfoConfig.configureHardwareCustom(&hardwareInfo, nullptr);
22+
23+
EXPECT_TRUE(hardwareInfo.capabilityTable.blitterOperationsSupported);
24+
}
25+
26+
DG1TEST_F(Dg1HwInfoConfigWindows, givenDg1WhenObtainingBlitterPreferenceThenReturnTrue) {
27+
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
28+
const auto &hardwareInfo = DG1::hwInfo;
29+
30+
EXPECT_TRUE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
31+
}

0 commit comments

Comments
 (0)