Disable bliter on DG1 Linux

move dg1 hw info config tests to shared

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-01-12 14:23:22 +00:00
committed by Compute-Runtime-Automation
parent c52223e642
commit 37c78b9ef7
9 changed files with 110 additions and 29 deletions

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2020-2021 Intel Corporation
# Copyright (C) 2020-2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -15,7 +15,6 @@ if(TESTS_DG1)
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_dg1.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_tests_dg1.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg1.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_dg1.cpp
${CMAKE_CURRENT_SOURCE_DIR}/execution_environment_tests_dg1.cpp
)

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -52,11 +52,6 @@ bool HwInfoConfigHw<gfxProduct>::isStorageInfoAdjustmentRequired() const {
return true;
}
template <>
bool HwInfoConfigHw<gfxProduct>::obtainBlitterPreference(const HardwareInfo &hwInfo) const {
return true;
}
template <>
bool HwInfoConfigHw<gfxProduct>::overrideGfxPartitionLayoutForWsl() const {
return true;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -21,5 +21,10 @@ void HwInfoConfigHw<gfxProduct>::setCapabilityCoherencyFlag(const HardwareInfo &
coherencyFlag = false;
}
template <>
bool HwInfoConfigHw<gfxProduct>::obtainBlitterPreference(const HardwareInfo &hwInfo) const {
return true;
}
template class HwInfoConfigHw<gfxProduct>;
} // namespace NEO

View File

@@ -0,0 +1,13 @@
#
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
if(TESTS_DG1)
target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg1.cpp
)
add_subdirectories()
endif()

View File

@@ -0,0 +1,13 @@
#
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
if(LINUX)
target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg1_linux.cpp
)
add_subdirectories()
endif()

View File

@@ -0,0 +1,31 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/test_macros/test.h"
using namespace NEO;
using Dg1HwInfoConfigLinux = ::testing::Test;
DG1TEST_F(Dg1HwInfoConfigLinux, whenConfigureHwInfoThenBlitterSupportIsDisabled) {
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
auto hardwareInfo = *defaultHwInfo;
hardwareInfo.capabilityTable.blitterOperationsSupported = false;
hwInfoConfig.configureHardwareCustom(&hardwareInfo, nullptr);
EXPECT_FALSE(hardwareInfo.capabilityTable.blitterOperationsSupported);
}
DG1TEST_F(Dg1HwInfoConfigLinux, givenDg1WhenObtainingBlitterPreferenceThenReturnFalse) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
const auto &hardwareInfo = DG1::hwInfo;
EXPECT_TRUE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -10,8 +10,6 @@
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/test_macros/test.h"
#include "opencl/source/helpers/hardware_commands_helper.h"
using namespace NEO;
using Dg1HwInfoConfig = ::testing::Test;
@@ -107,13 +105,6 @@ DG1TEST_F(Dg1HwInfo, whenPlatformIsDg1ThenExpectSvmIsSet) {
EXPECT_TRUE(hardwareInfo.capabilityTable.ftrSvm);
}
DG1TEST_F(Dg1HwInfo, givenDg1WhenObtainingBlitterPreferenceThenReturnTrue) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
const auto &hardwareInfo = DG1::hwInfo;
EXPECT_TRUE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
}
DG1TEST_F(Dg1HwInfo, givenDg1WhenObtainingFullBlitterSupportThenReturnFalse) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
const auto &hardwareInfo = DG1::hwInfo;
@@ -121,16 +112,6 @@ DG1TEST_F(Dg1HwInfo, givenDg1WhenObtainingFullBlitterSupportThenReturnFalse) {
EXPECT_FALSE(hwInfoConfig.isBlitterFullySupported(hardwareInfo));
}
DG1TEST_F(Dg1HwInfo, whenConfigureHwInfoThenBlitterSupportIsEnabled) {
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
auto hardwareInfo = *defaultHwInfo;
hardwareInfo.capabilityTable.blitterOperationsSupported = false;
hwInfoConfig.configureHardwareCustom(&hardwareInfo, nullptr);
EXPECT_TRUE(hardwareInfo.capabilityTable.blitterOperationsSupported);
}
DG1TEST_F(Dg1HwInfo, whenOverrideGfxPartitionLayoutForWslThenReturnTrue) {
auto hwInfoConfig = HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
EXPECT_TRUE(hwInfoConfig->overrideGfxPartitionLayoutForWsl());

View File

@@ -0,0 +1,13 @@
#
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
if(WIN32)
target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg1_windows.cpp
)
add_subdirectories()
endif()

View File

@@ -0,0 +1,31 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/test_macros/test.h"
using namespace NEO;
using Dg1HwInfoConfigWindows = ::testing::Test;
DG1TEST_F(Dg1HwInfoConfigWindows, whenConfigureHwInfoThenBlitterSupportIsEnabled) {
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
auto hardwareInfo = *defaultHwInfo;
hardwareInfo.capabilityTable.blitterOperationsSupported = false;
hwInfoConfig.configureHardwareCustom(&hardwareInfo, nullptr);
EXPECT_TRUE(hardwareInfo.capabilityTable.blitterOperationsSupported);
}
DG1TEST_F(Dg1HwInfoConfigWindows, givenDg1WhenObtainingBlitterPreferenceThenReturnTrue) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
const auto &hardwareInfo = DG1::hwInfo;
EXPECT_TRUE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
}