mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
ULT: Move product specific tests to shared (gen9-gen12lp)
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
0772d32a76
commit
0f8489b5f8
@ -13,11 +13,8 @@ if(TESTS_GEN11)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_tests_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_tests_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_receiver_tests_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cl_device_caps_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_gen11.cpp
|
||||
)
|
||||
|
||||
get_property(NEO_CORE_TESTS_GEN11 GLOBAL PROPERTY NEO_CORE_TESTS_GEN11)
|
||||
|
43
opencl/test/unit_test/gen11/test_cl_device_caps_gen11.cpp
Normal file
43
opencl/test/unit_test/gen11/test_cl_device_caps_gen11.cpp
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using Gen11ClDeviceCaps = Test<ClDeviceFixture>;
|
||||
|
||||
GEN11TEST_F(Gen11ClDeviceCaps, givenGen11WhenCheckExtensionsThenSubgroupLocalBlockIOIsSupported) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_intel_subgroup_local_block_io")));
|
||||
}
|
||||
|
||||
GEN11TEST_F(Gen11ClDeviceCaps, givenGen11WhenCheckExtensionsThenDeviceProperlyReportsClKhrSubgroupsExtension) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups")));
|
||||
} else {
|
||||
EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups")));
|
||||
}
|
||||
}
|
||||
|
||||
GEN11TEST_F(Gen11ClDeviceCaps, givenGen11WhenCheckingCapsThenDeviceDoesProperlyReportsIndependentForwardProgress) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_TRUE(caps.independentForwardProgress != 0);
|
||||
} else {
|
||||
EXPECT_FALSE(caps.independentForwardProgress != 0);
|
||||
}
|
||||
}
|
@ -14,7 +14,6 @@ if(TESTS_GEN12LP)
|
||||
${IGDRCL_SRCS_tests_gen12lp_excludes}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/buffer_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gen12lp_tests_wrapper.cpp
|
||||
@ -24,11 +23,8 @@ if(TESTS_GEN12LP)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/profiling_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_receiver_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cl_device_caps_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_gen12lp.inl
|
||||
)
|
||||
|
||||
get_property(NEO_CORE_TESTS_GEN12LP GLOBAL PROPERTY NEO_CORE_TESTS_GEN12LP)
|
||||
|
@ -13,7 +13,6 @@ if(TESTS_ADLP)
|
||||
set(IGDRCL_SRCS_tests_gen12lp_adlp
|
||||
${IGDRCL_SRCS_tests_gen12lp_adlp_excludes}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_adlp.cpp
|
||||
)
|
||||
|
||||
get_property(NEO_CORE_TESTS_GEN12LP_ADLP GLOBAL PROPERTY NEO_CORE_TESTS_GEN12LP_ADLP)
|
||||
|
@ -7,7 +7,6 @@
|
||||
if(TESTS_ADLS)
|
||||
set(IGDRCL_SRCS_tests_gen12lp_adls
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_adls.cpp
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen12lp_adls})
|
||||
add_subdirectories()
|
||||
|
@ -13,10 +13,7 @@ if(TESTS_DG1)
|
||||
set(IGDRCL_SRCS_tests_dg1
|
||||
${IGDRCL_SRCS_tests_gen12lp_dg1_excludes}
|
||||
${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_device_caps_dg1.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/execution_environment_tests_dg1.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cl_device_caps_dg1.cpp
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_dg1})
|
||||
add_subdirectories()
|
||||
|
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/hw_cmds_dg1.h"
|
||||
#include "shared/source/os_interface/driver_info.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using Dg1ClDeviceCaps = Test<ClDeviceFixture>;
|
||||
|
||||
DG1TEST_F(Dg1ClDeviceCaps, givenDg1hpWhenInitializeCapsThenVmeIsNotSupported) {
|
||||
pClDevice->driverInfo.reset();
|
||||
pClDevice->name.clear();
|
||||
pClDevice->initializeCaps();
|
||||
|
||||
cl_uint expectedVmeAvcVersion = CL_AVC_ME_VERSION_0_INTEL;
|
||||
cl_uint expectedVmeVersion = CL_ME_VERSION_LEGACY_INTEL;
|
||||
|
||||
EXPECT_EQ(expectedVmeVersion, pClDevice->getDeviceInfo().vmeVersion);
|
||||
EXPECT_EQ(expectedVmeAvcVersion, pClDevice->getDeviceInfo().vmeAvcVersion);
|
||||
|
||||
EXPECT_FALSE(pClDevice->getDeviceInfo().vmeAvcSupportsTextureSampler);
|
||||
EXPECT_FALSE(pDevice->getDeviceInfo().vmeAvcSupportsPreemption);
|
||||
}
|
@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "opencl/test/unit_test/gen12lp/buffer_tests_gen12lp.inl"
|
||||
#include "opencl/test/unit_test/gen12lp/coherency_tests_gen12lp.inl"
|
||||
#include "opencl/test/unit_test/gen12lp/command_stream_receiver_hw_tests_gen12lp.inl"
|
||||
#include "opencl/test/unit_test/gen12lp/enqueue_media_kernel_gen12lp.inl"
|
||||
#include "opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl"
|
||||
@ -14,8 +13,5 @@
|
||||
#include "opencl/test/unit_test/gen12lp/image_tests_gen12lp.inl"
|
||||
#include "opencl/test/unit_test/gen12lp/kernel_tests_gen12lp.inl"
|
||||
#include "opencl/test/unit_test/gen12lp/profiling_tests_gen12lp.inl"
|
||||
#include "opencl/test/unit_test/gen12lp/sampler_tests_gen12lp.inl"
|
||||
#include "opencl/test/unit_test/gen12lp/tbx_command_stream_receiver_tests_gen12lp.inl"
|
||||
#include "opencl/test/unit_test/gen12lp/test_device_caps_gen12lp.inl"
|
||||
#include "opencl/test/unit_test/gen12lp/test_cl_device_caps_gen12lp.inl"
|
||||
#include "opencl/test/unit_test/gen12lp/test_platform_caps_gen12lp.inl"
|
||||
#include "opencl/test/unit_test/gen12lp/test_sample_gen12lp.inl"
|
||||
|
@ -10,12 +10,5 @@ if(TESTS_RKL)
|
||||
)
|
||||
set_property(GLOBAL APPEND PROPERTY IGDRCL_SRCS_tests_excludes ${IGDRCL_SRCS_tests_gen12lp_rkl_excludes})
|
||||
|
||||
set(IGDRCL_SRCS_tests_gen12lp_rkl
|
||||
${IGDRCL_SRCS_tests_gen12lp_rkl_excludes}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_helper_rkl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_rkl.cpp
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen12lp_rkl})
|
||||
add_subdirectories()
|
||||
endif()
|
||||
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/hw_cmds_rkl.h"
|
||||
#include "shared/source/helpers/compiler_hw_info_config.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using RklHwInfoConfig = ::testing::Test;
|
||||
|
||||
RKLTEST_F(RklHwInfoConfig, givenA0OrBSteppingAndRklPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
std::array<std::pair<uint32_t, bool>, 3> revisions = {
|
||||
{{REVISION_A0, true},
|
||||
{REVISION_B, true},
|
||||
{REVISION_C, false}}};
|
||||
|
||||
for (const auto &[revision, paramBool] : revisions) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
|
||||
|
||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
||||
|
||||
EXPECT_EQ(paramBool, hwInfoConfig->isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||
}
|
||||
}
|
||||
|
||||
RKLTEST_F(RklHwInfoConfig, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
|
||||
}
|
||||
|
||||
using CompilerHwInfoConfigHelperTestsRkl = ::testing::Test;
|
||||
RKLTEST_F(CompilerHwInfoConfigHelperTestsRkl, givenRklWhenIsForceEmuInt32DivRemSPRequiredIsCalledThenReturnsTrue) {
|
||||
EXPECT_TRUE(CompilerHwInfoConfig::get(productFamily)->isForceEmuInt32DivRemSPRequired());
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using Gen12LpClDeviceCaps = Test<ClDeviceFixture>;
|
||||
|
||||
HWTEST2_F(Gen12LpClDeviceCaps, WhenCheckingExtensionStringThenFp64IsNotSupported, IsTGLLP) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
std::string extensionString = caps.deviceExtensions;
|
||||
|
||||
EXPECT_EQ(std::string::npos, extensionString.find(std::string("cl_khr_fp64")));
|
||||
EXPECT_EQ(0u, caps.doubleFpConfig);
|
||||
}
|
||||
|
||||
HWTEST2_F(Gen12LpClDeviceCaps, givenGen12lpWhenCheckExtensionsThenSubgroupLocalBlockIOIsSupported, IsTGLLP) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_intel_subgroup_local_block_io")));
|
||||
}
|
||||
|
||||
HWTEST2_F(Gen12LpClDeviceCaps, givenGen12lpWhenCheckExtensionsThenDeviceDoesNotReportClKhrSubgroupsExtension, IsTGLLP) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups")));
|
||||
}
|
||||
|
||||
HWTEST2_F(Gen12LpClDeviceCaps, givenGen12lpWhenCheckingCapsThenDeviceDoesNotSupportIndependentForwardProgress, IsTGLLP) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
EXPECT_FALSE(caps.independentForwardProgress);
|
||||
}
|
||||
|
||||
HWTEST2_F(Gen12LpClDeviceCaps, WhenCheckingCapsThenCorrectlyRoundedDivideSqrtIsNotSupported, IsTGLLP) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
EXPECT_EQ(0u, caps.singleFpConfig & CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LpClDeviceCaps, WhenCheckingCapsThenProfilingTimerResolutionIs83) {
|
||||
const auto &caps = pClDevice->getSharedDeviceInfo();
|
||||
EXPECT_EQ(83u, caps.outProfilingTimerResolution);
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> TigerlakeLpOnlyTest;
|
||||
|
||||
HWTEST2_F(TigerlakeLpOnlyTest, WhenGettingHardwareInfoThenProductFamilyIsTigerlakeLp, IsTGLLP) {
|
||||
EXPECT_EQ(IGFX_TIGERLAKE_LP, pDevice->getHardwareInfo().platform.eProductFamily);
|
||||
}
|
||||
|
||||
typedef Test<ClDeviceFixture> Gen12LpOnlyTeset;
|
||||
|
||||
GEN12LPTEST_F(Gen12LpOnlyTeset, WhenGettingRenderCoreFamilyThenGen12lpCoreIsReturned) {
|
||||
EXPECT_NE(IGFX_GEN9_CORE, pDevice->getRenderCoreFamily());
|
||||
EXPECT_NE(IGFX_GEN11_CORE, pDevice->getRenderCoreFamily());
|
||||
EXPECT_EQ(IGFX_GEN12LP_CORE, pDevice->getRenderCoreFamily());
|
||||
}
|
@ -14,8 +14,6 @@ if(TESTS_TGLLP)
|
||||
${IGDRCL_SRCS_tests_gen12lp_tgllp_excludes}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_tests_tgllp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_helper_tgllp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_tgllp.cpp
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen12lp_tgllp})
|
||||
add_subdirectories()
|
||||
|
@ -1,200 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/hw_cmds_tgllp.h"
|
||||
#include "shared/source/os_interface/device_factory.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using TgllpHwInfoConfig = ::testing::Test;
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfoConfig, givenHwInfoErrorneousConfigStringThenThrow) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
|
||||
uint64_t config = 0xdeadbeef;
|
||||
gtSystemInfo = {0};
|
||||
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&hwInfo, false, config));
|
||||
EXPECT_EQ(0u, gtSystemInfo.SliceCount);
|
||||
EXPECT_EQ(0u, gtSystemInfo.SubSliceCount);
|
||||
EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount);
|
||||
EXPECT_EQ(0u, gtSystemInfo.EUCount);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfoConfig, whenUsingCorrectConfigValueThenCorrectHwInfoIsReturned) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
|
||||
uint64_t config = 0x100060010;
|
||||
|
||||
gtSystemInfo = {0};
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, config);
|
||||
EXPECT_EQ(1u, gtSystemInfo.SliceCount);
|
||||
EXPECT_EQ(6u, gtSystemInfo.DualSubSliceCount);
|
||||
|
||||
config = 0x100020010;
|
||||
|
||||
gtSystemInfo = {0};
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, config);
|
||||
EXPECT_EQ(1u, gtSystemInfo.SliceCount);
|
||||
EXPECT_EQ(2u, gtSystemInfo.DualSubSliceCount);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfoConfig, givenA0SteppingAndTgllpPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
std::array<std::pair<uint32_t, bool>, 3> revisions = {
|
||||
{{REVISION_A0, true},
|
||||
{REVISION_B, false},
|
||||
{REVISION_C, false}}};
|
||||
|
||||
for (const auto &[revision, paramBool] : revisions) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
|
||||
|
||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
||||
|
||||
EXPECT_EQ(paramBool, hwInfoConfig->pipeControlWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, hwInfoConfig->imagePitchAlignmentWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, hwInfoConfig->isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||
}
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfoConfig, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
|
||||
}
|
||||
|
||||
using TgllpHwInfo = ::testing::Test;
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenBoolWhenCallTgllpHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) {
|
||||
static bool boolValue[]{
|
||||
true, false};
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
FeatureTable &featureTable = hwInfo.featureTable;
|
||||
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;
|
||||
|
||||
uint64_t configs[] = {
|
||||
0x100060010,
|
||||
0x100020010};
|
||||
|
||||
for (auto &config : configs) {
|
||||
for (auto setParamBool : boolValue) {
|
||||
|
||||
gtSystemInfo = {0};
|
||||
featureTable = {};
|
||||
workaroundTable = {};
|
||||
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config);
|
||||
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrSVM);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrIA32eGfxPTEs);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrStandardMipTailFormat);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrTranslationTable);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrUserModeTranslationTable);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrTileMappedResource);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrFbc);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrTileY);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrAstcHdr2D);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrAstcLdr2D);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt);
|
||||
|
||||
EXPECT_EQ(setParamBool, workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface);
|
||||
EXPECT_EQ(setParamBool, workaroundTable.flags.waUntypedBufferCompression);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenHwInfoConfigStringThenAfterSetupResultingVmeIsDisabled) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
|
||||
uint64_t config = 0x100060010;
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, config);
|
||||
EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler);
|
||||
EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption);
|
||||
EXPECT_FALSE(hwInfo.capabilityTable.supportsVme);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenSetCommandStreamReceiverInAubModeForTgllpProductFamilyWhenPrepareDeviceEnvironmentsForProductFamilyOverrideIsCalledThenAubCenterIsInitializedCorrectly) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(1);
|
||||
DebugManager.flags.ProductFamilyOverride.set("tgllp");
|
||||
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
|
||||
bool success = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(executionEnvironment);
|
||||
ASSERT_TRUE(success);
|
||||
|
||||
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
|
||||
|
||||
EXPECT_TRUE(rootDeviceEnvironment->initAubCenterCalled);
|
||||
EXPECT_FALSE(rootDeviceEnvironment->localMemoryEnabledReceived);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenSetCommandStreamReceiverInAubModeWithOverrideGpuAddressSpaceWhenPrepareDeviceEnvironmentsForProductFamilyOverrideIsCalledThenAubManagerIsInitializedWithCorrectGpuAddressSpace) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(1);
|
||||
DebugManager.flags.ProductFamilyOverride.set("tgllp");
|
||||
DebugManager.flags.OverrideGpuAddressSpace.set(48);
|
||||
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
|
||||
bool success = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(executionEnvironment);
|
||||
ASSERT_TRUE(success);
|
||||
|
||||
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
|
||||
|
||||
auto mockAubManager = static_cast<MockAubManager *>(rootDeviceEnvironment->aubCenter->getAubManager());
|
||||
EXPECT_EQ(MemoryConstants::max48BitAddress, mockAubManager->mockAubManagerParams.gpuAddressSpace);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenSetCommandStreamReceiverInAubModeWhenPrepareDeviceEnvironmentsForProductFamilyOverrideIsCalledThenAllRootDeviceEnvironmentMembersAreInitialized) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
auto requiredDeviceCount = 2u;
|
||||
DebugManager.flags.CreateMultipleRootDevices.set(requiredDeviceCount);
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(1);
|
||||
DebugManager.flags.ProductFamilyOverride.set("tgllp");
|
||||
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get(), true, requiredDeviceCount);
|
||||
|
||||
bool success = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(executionEnvironment);
|
||||
ASSERT_TRUE(success);
|
||||
|
||||
std::set<MemoryOperationsHandler *> memoryOperationHandlers;
|
||||
for (auto rootDeviceIndex = 0u; rootDeviceIndex < requiredDeviceCount; rootDeviceIndex++) {
|
||||
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[rootDeviceIndex].get());
|
||||
EXPECT_TRUE(rootDeviceEnvironment->initAubCenterCalled);
|
||||
EXPECT_FALSE(rootDeviceEnvironment->localMemoryEnabledReceived);
|
||||
|
||||
auto memoryOperationInterface = rootDeviceEnvironment->memoryOperationsInterface.get();
|
||||
EXPECT_NE(nullptr, memoryOperationInterface);
|
||||
EXPECT_EQ(memoryOperationHandlers.end(), memoryOperationHandlers.find(memoryOperationInterface));
|
||||
memoryOperationHandlers.insert(memoryOperationInterface);
|
||||
}
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenTgllpWhenObtainingBlitterPreferenceThenReturnFalse) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
const auto &hardwareInfo = *defaultHwInfo;
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenHwInfoConfigWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_EQ(hwInfoConfig.getProductConfigFromHwInfo(hwInfo), AOT::TGL);
|
||||
}
|
@ -9,18 +9,14 @@ if(TESTS_GEN9)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cl_get_platform_ids_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cl_hw_helper_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sip_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cl_device_caps_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_gen9.cpp
|
||||
)
|
||||
|
||||
get_property(NEO_CORE_TESTS_GEN9 GLOBAL PROPERTY NEO_CORE_TESTS_GEN9)
|
||||
|
@ -7,7 +7,6 @@
|
||||
if(TESTS_BXT)
|
||||
set(IGDRCL_SRCS_tests_gen9_bxt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_tests_bxt.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_bxt.cpp
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_bxt})
|
||||
|
@ -7,9 +7,7 @@
|
||||
if(TESTS_SKL)
|
||||
set(IGDRCL_SRCS_tests_gen9_skl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_tests_skl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_skl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_skl.cpp
|
||||
)
|
||||
|
||||
get_property(NEO_CORE_TESTS_GEN9_SKL GLOBAL PROPERTY NEO_CORE_TESTS_GEN9_SKL)
|
||||
|
@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_skl.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> SkylakeOnlyTest;
|
||||
|
||||
SKLTEST_F(SkylakeOnlyTest, WhenGettingProductFamilyThenSkylakeIsReturned) {
|
||||
EXPECT_EQ(IGFX_SKYLAKE, pDevice->getHardwareInfo().platform.eProductFamily);
|
||||
}
|
53
opencl/test/unit_test/gen9/test_cl_device_caps_gen9.cpp
Normal file
53
opencl/test/unit_test/gen9/test_cl_device_caps_gen9.cpp
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using Gen9ClDeviceCaps = Test<ClDeviceFixture>;
|
||||
|
||||
GEN9TEST_F(Gen9ClDeviceCaps, WhenCheckingExtensionStringThenFp64CorrectlyReported) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
std::string extensionString = caps.deviceExtensions;
|
||||
if (pDevice->getHardwareInfo().capabilityTable.ftrSupportsFP64) {
|
||||
EXPECT_NE(std::string::npos, extensionString.find(std::string("cl_khr_fp64")));
|
||||
EXPECT_NE(0u, caps.doubleFpConfig);
|
||||
} else {
|
||||
EXPECT_EQ(std::string::npos, extensionString.find(std::string("cl_khr_fp64")));
|
||||
EXPECT_EQ(0u, caps.doubleFpConfig);
|
||||
}
|
||||
}
|
||||
|
||||
GEN9TEST_F(Gen9ClDeviceCaps, givenGen9WhenCheckExtensionsThenDeviceProperlyReportsClKhrSubgroupsExtension) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups")));
|
||||
} else {
|
||||
EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups")));
|
||||
}
|
||||
}
|
||||
|
||||
GEN9TEST_F(Gen9ClDeviceCaps, givenGen9WhenCheckingCapsThenDeviceDoesProperlyReportsIndependentForwardProgress) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_TRUE(caps.independentForwardProgress != 0);
|
||||
} else {
|
||||
EXPECT_FALSE(caps.independentForwardProgress != 0);
|
||||
}
|
||||
}
|
||||
|
||||
GEN9TEST_F(Gen9ClDeviceCaps, WhenGettingDeviceInfoThenCorrectlyRoundedDivideSqrtIsEnabled) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
EXPECT_NE(0u, caps.singleFpConfig & CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT);
|
||||
}
|
@ -13,10 +13,14 @@ if(TESTS_GEN11)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/preamble_tests_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_receiver_tests_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_gen11.cpp
|
||||
)
|
||||
|
||||
add_subdirectories()
|
||||
|
@ -7,16 +7,15 @@
|
||||
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> Gen11SamplerTest;
|
||||
using Gen11SamplerTest = ::testing::Test;
|
||||
|
||||
GEN11TEST_F(Gen11SamplerTest, WhenAppendingSamplerStateParamsThenStateIsNotChanged) {
|
||||
typedef typename FamilyType::SAMPLER_STATE SAMPLER_STATE;
|
@ -7,14 +7,13 @@
|
||||
|
||||
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using Gen11TbxCommandStreamReceiverTests = Test<ClDeviceFixture>;
|
||||
using Gen11TbxCommandStreamReceiverTests = Test<DeviceFixture>;
|
||||
|
||||
GEN11TEST_F(Gen11TbxCommandStreamReceiverTests, whenAskedForPollForCompletionParametersThenReturnCorrectValues) {
|
||||
class MyMockTbxHw : public TbxCommandStreamReceiverHw<FamilyType> {
|
@ -7,15 +7,13 @@
|
||||
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> Gen11DeviceCaps;
|
||||
using Gen11DeviceCaps = Test<DeviceFixture>;
|
||||
|
||||
GEN11TEST_F(Gen11DeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenMidThreadIsReturned) {
|
||||
EXPECT_TRUE(PreemptionMode::MidThread == pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode);
|
||||
@ -77,29 +75,3 @@ GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckingMediaBlockSupportThenReturnTr
|
||||
GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckingCoherencySupportThenReturnFalse) {
|
||||
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsCoherency);
|
||||
}
|
||||
|
||||
GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckExtensionsThenSubgroupLocalBlockIOIsSupported) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_intel_subgroup_local_block_io")));
|
||||
}
|
||||
|
||||
GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckExtensionsThenDeviceProperlyReportsClKhrSubgroupsExtension) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups")));
|
||||
} else {
|
||||
EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups")));
|
||||
}
|
||||
}
|
||||
|
||||
GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckingCapsThenDeviceDoesProperlyReportsIndependentForwardProgress) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_TRUE(caps.independentForwardProgress != 0);
|
||||
} else {
|
||||
EXPECT_FALSE(caps.independentForwardProgress != 0);
|
||||
}
|
||||
}
|
@ -6,15 +6,14 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> Gen11OnlyTeset;
|
||||
using Gen11OnlyTest = ::testing::Test;
|
||||
|
||||
GEN11TEST_F(Gen11OnlyTeset, WhenGettingRenderCoreFamilyThenGen11CoreIsReturned) {
|
||||
EXPECT_EQ(IGFX_GEN11_CORE, pDevice->getRenderCoreFamily());
|
||||
GEN11TEST_F(Gen11OnlyTest, WhenGettingRenderCoreFamilyThenGen11CoreIsReturned) {
|
||||
EXPECT_EQ(IGFX_GEN11_CORE, defaultHwInfo->platform.eRenderCoreFamily);
|
||||
}
|
@ -8,6 +8,7 @@ if(TESTS_GEN12LP)
|
||||
target_sources(neo_shared_tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen12lp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_gen12lp.inl
|
||||
@ -16,12 +17,16 @@ if(TESTS_GEN12LP)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen12lp_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_gen12lp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen12lp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen12lp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_receiver_tests_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_command_encoder_gen12lp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_gen12lp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_encode_gen12lp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen12lp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen12lp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen12lp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_gen12lp.inl
|
||||
)
|
||||
|
||||
add_subdirectories()
|
||||
|
@ -10,6 +10,7 @@ if(TESTS_ADLP)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_adlp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/excludes_adlp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/preamble_helper_tests_adlp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_adlp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_adlp.cpp
|
||||
)
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
if(TESTS_ADLS)
|
||||
target_sources(neo_shared_tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_adls.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_adls.cpp
|
||||
)
|
||||
|
||||
|
@ -6,14 +6,13 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/hw_cmds_adls.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using AdlsUsDeviceIdTest = Test<ClDeviceFixture>;
|
||||
using AdlsUsDeviceIdTest = Test<DeviceFixture>;
|
||||
|
||||
ADLSTEST_F(AdlsUsDeviceIdTest, givenAdlsWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics);
|
@ -8,6 +8,10 @@ if(TESTS_DG1)
|
||||
target_sources(neo_shared_tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/excludes_gen12lp_dg1.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/execution_environment_tests_dg1.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_dg1.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_tests_dg1.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_dg1.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg1.cpp
|
||||
)
|
||||
add_subdirectories()
|
||||
|
@ -11,8 +11,6 @@
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
|
||||
#include "opencl/source/helpers/cl_hw_helper.h"
|
||||
|
||||
using HwHelperTestDg1 = HwHelperTest;
|
||||
|
||||
DG1TEST_F(HwHelperTestDg1, givenDg1SteppingA0WhenAdjustDefaultEngineTypeCalledThenRcsIsReturned) {
|
@ -6,15 +6,13 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/hw_cmds_dg1.h"
|
||||
#include "shared/source/os_interface/driver_info.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using Dg1DeviceCaps = Test<ClDeviceFixture>;
|
||||
using Dg1DeviceCaps = Test<DeviceFixture>;
|
||||
|
||||
DG1TEST_F(Dg1DeviceCaps, givenDg1WhenCheckSupportCacheFlushAfterWalkerThenFalse) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.supportCacheFlushAfterWalker);
|
||||
@ -30,21 +28,6 @@ DG1TEST_F(Dg1DeviceCaps, givenDG1WhenRequestedVmeFlagsThenReturnFalse) {
|
||||
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsVmeAvcPreemption);
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1DeviceCaps, givenDg1hpWhenInitializeCapsThenVmeIsNotSupported) {
|
||||
pClDevice->driverInfo.reset();
|
||||
pClDevice->name.clear();
|
||||
pClDevice->initializeCaps();
|
||||
|
||||
cl_uint expectedVmeAvcVersion = CL_AVC_ME_VERSION_0_INTEL;
|
||||
cl_uint expectedVmeVersion = CL_ME_VERSION_LEGACY_INTEL;
|
||||
|
||||
EXPECT_EQ(expectedVmeVersion, pClDevice->getDeviceInfo().vmeVersion);
|
||||
EXPECT_EQ(expectedVmeAvcVersion, pClDevice->getDeviceInfo().vmeAvcVersion);
|
||||
|
||||
EXPECT_FALSE(pClDevice->getDeviceInfo().vmeAvcSupportsTextureSampler);
|
||||
EXPECT_FALSE(pDevice->getDeviceInfo().vmeAvcSupportsPreemption);
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1DeviceCaps, givenDg1WhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics);
|
||||
}
|
@ -6,5 +6,10 @@
|
||||
*/
|
||||
|
||||
#include "shared/test/unit_test/gen12lp/aub_command_stream_receiver_tests_gen12lp.inl"
|
||||
#include "shared/test/unit_test/gen12lp/coherency_tests_gen12lp.inl"
|
||||
#include "shared/test/unit_test/gen12lp/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl"
|
||||
#include "shared/test/unit_test/gen12lp/compute_mode_tests_gen12lp.inl"
|
||||
#include "shared/test/unit_test/gen12lp/sampler_tests_gen12lp.inl"
|
||||
#include "shared/test/unit_test/gen12lp/tbx_command_stream_receiver_tests_gen12lp.inl"
|
||||
#include "shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl"
|
||||
#include "shared/test/unit_test/gen12lp/test_sample_gen12lp.inl"
|
@ -8,6 +8,7 @@ if(TESTS_RKL)
|
||||
target_sources(neo_shared_tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/excludes_gen12lp_rkl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_helper_rkl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_rkl.cpp
|
||||
)
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/hw_cmds_rkl.h"
|
||||
#include "shared/source/helpers/compiler_hw_info_config.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
@ -116,3 +117,32 @@ RKLTEST_F(RklHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getPipelineSelectPropertySystolicModeSupport());
|
||||
}
|
||||
|
||||
using RklHwInfoConfig = ::testing::Test;
|
||||
|
||||
RKLTEST_F(RklHwInfoConfig, givenA0OrBSteppingAndRklPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
std::array<std::pair<uint32_t, bool>, 3> revisions = {
|
||||
{{REVISION_A0, true},
|
||||
{REVISION_B, true},
|
||||
{REVISION_C, false}}};
|
||||
|
||||
for (const auto &[revision, paramBool] : revisions) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
|
||||
|
||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
||||
|
||||
EXPECT_EQ(paramBool, hwInfoConfig->isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||
}
|
||||
}
|
||||
|
||||
RKLTEST_F(RklHwInfoConfig, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
|
||||
}
|
||||
|
||||
using CompilerHwInfoConfigHelperTestsRkl = ::testing::Test;
|
||||
RKLTEST_F(CompilerHwInfoConfigHelperTestsRkl, givenRklWhenIsForceEmuInt32DivRemSPRequiredIsCalledThenReturnsTrue) {
|
||||
EXPECT_TRUE(CompilerHwInfoConfig::get(productFamily)->isForceEmuInt32DivRemSPRequired());
|
||||
}
|
||||
|
@ -7,16 +7,15 @@
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> Gen12LpSamplerTest;
|
||||
using Gen12LpSamplerTest = Test<DeviceFixture>;
|
||||
|
||||
HWTEST2_F(Gen12LpSamplerTest, givenTglLpSamplerWhenUsingDefaultFilteringAndAppendSamplerStateParamsThenDisableLowQualityFilter, IsTGLLP) {
|
||||
EXPECT_FALSE(DebugManager.flags.ForceSamplerLowFilteringPrecision.get());
|
@ -7,14 +7,13 @@
|
||||
|
||||
#include "shared/source/aub_mem_dump/page_table_entry_bits.h"
|
||||
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using Gen12LPTbxCommandStreamReceiverTests = Test<ClDeviceFixture>;
|
||||
using Gen12LPTbxCommandStreamReceiverTests = Test<DeviceFixture>;
|
||||
|
||||
GEN12LPTEST_F(Gen12LPTbxCommandStreamReceiverTests, givenNullPtrGraphicsAlloctionWhenGetPPGTTAdditionalBitsIsCalledThenAppropriateValueIsReturned) {
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
@ -6,55 +6,18 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> Gen12LpDeviceCaps;
|
||||
|
||||
HWTEST2_F(Gen12LpDeviceCaps, WhenCheckingExtensionStringThenFp64IsNotSupported, IsTGLLP) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
std::string extensionString = caps.deviceExtensions;
|
||||
|
||||
EXPECT_EQ(std::string::npos, extensionString.find(std::string("cl_khr_fp64")));
|
||||
EXPECT_EQ(0u, caps.doubleFpConfig);
|
||||
}
|
||||
|
||||
HWTEST2_F(Gen12LpDeviceCaps, givenGen12lpWhenCheckExtensionsThenSubgroupLocalBlockIOIsSupported, IsTGLLP) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_intel_subgroup_local_block_io")));
|
||||
}
|
||||
|
||||
HWTEST2_F(Gen12LpDeviceCaps, givenGen12lpWhenCheckExtensionsThenDeviceDoesNotReportClKhrSubgroupsExtension, IsTGLLP) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups")));
|
||||
}
|
||||
|
||||
HWTEST2_F(Gen12LpDeviceCaps, givenGen12lpWhenCheckingCapsThenDeviceDoesNotSupportIndependentForwardProgress, IsTGLLP) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
EXPECT_FALSE(caps.independentForwardProgress);
|
||||
}
|
||||
|
||||
HWTEST2_F(Gen12LpDeviceCaps, WhenCheckingCapsThenCorrectlyRoundedDivideSqrtIsNotSupported, IsTGLLP) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
EXPECT_EQ(0u, caps.singleFpConfig & CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT);
|
||||
}
|
||||
using Gen12LpDeviceCaps = Test<DeviceFixture>;
|
||||
|
||||
GEN12LPTEST_F(Gen12LpDeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenMidThreadIsReported) {
|
||||
EXPECT_EQ(PreemptionMode::MidThread, pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LpDeviceCaps, WhenCheckingCapsThenProfilingTimerResolutionIs83) {
|
||||
const auto &caps = pClDevice->getSharedDeviceInfo();
|
||||
EXPECT_EQ(83u, caps.outProfilingTimerResolution);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LpDeviceCaps, WhenCheckingCapsThenKmdNotifyMechanismIsCorrectlyReported) {
|
||||
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify);
|
||||
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
|
25
shared/test/unit_test/gen12lp/test_sample_gen12lp.inl
Normal file
25
shared/test/unit_test/gen12lp/test_sample_gen12lp.inl
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using TigerlakeLpOnlyTest = ::testing::Test;
|
||||
|
||||
HWTEST2_F(TigerlakeLpOnlyTest, WhenGettingHardwareInfoThenProductFamilyIsTigerlakeLp, IsTGLLP) {
|
||||
EXPECT_EQ(IGFX_TIGERLAKE_LP, defaultHwInfo->platform.eProductFamily);
|
||||
}
|
||||
|
||||
using Gen12LpOnlyTest = ::testing::Test;
|
||||
|
||||
GEN12LPTEST_F(Gen12LpOnlyTest, WhenGettingRenderCoreFamilyThenGen12lpCoreIsReturned) {
|
||||
EXPECT_NE(IGFX_GEN9_CORE, defaultHwInfo->platform.eRenderCoreFamily);
|
||||
EXPECT_NE(IGFX_GEN11_CORE, defaultHwInfo->platform.eRenderCoreFamily);
|
||||
EXPECT_EQ(IGFX_GEN12LP_CORE, defaultHwInfo->platform.eRenderCoreFamily);
|
||||
}
|
@ -9,6 +9,7 @@ if(TESTS_TGLLP)
|
||||
|
||||
target_sources(neo_shared_tests PRIVATE
|
||||
${NEO_SHARED_tests_genlp12_tgllp}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_helper_tgllp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests_tgllp.cpp
|
||||
)
|
||||
|
||||
|
@ -6,11 +6,16 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/hw_cmds_tgllp.h"
|
||||
#include "shared/source/os_interface/device_factory.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using HwInfoConfigTestTgllp = ::testing::Test;
|
||||
@ -51,3 +56,183 @@ TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoConfigWhenGetCommandsStreamPropert
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getPipelineSelectPropertySystolicModeSupport());
|
||||
}
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoErrorneousConfigStringThenThrow) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
|
||||
uint64_t config = 0xdeadbeef;
|
||||
gtSystemInfo = {0};
|
||||
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&hwInfo, false, config));
|
||||
EXPECT_EQ(0u, gtSystemInfo.SliceCount);
|
||||
EXPECT_EQ(0u, gtSystemInfo.SubSliceCount);
|
||||
EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount);
|
||||
EXPECT_EQ(0u, gtSystemInfo.EUCount);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestTgllp, whenUsingCorrectConfigValueThenCorrectHwInfoIsReturned) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
|
||||
uint64_t config = 0x100060010;
|
||||
|
||||
gtSystemInfo = {0};
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, config);
|
||||
EXPECT_EQ(1u, gtSystemInfo.SliceCount);
|
||||
EXPECT_EQ(6u, gtSystemInfo.DualSubSliceCount);
|
||||
|
||||
config = 0x100020010;
|
||||
|
||||
gtSystemInfo = {0};
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, config);
|
||||
EXPECT_EQ(1u, gtSystemInfo.SliceCount);
|
||||
EXPECT_EQ(2u, gtSystemInfo.DualSubSliceCount);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestTgllp, givenA0SteppingAndTgllpPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
std::array<std::pair<uint32_t, bool>, 3> revisions = {
|
||||
{{REVISION_A0, true},
|
||||
{REVISION_B, false},
|
||||
{REVISION_C, false}}};
|
||||
|
||||
for (const auto &[revision, paramBool] : revisions) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
|
||||
|
||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
||||
|
||||
EXPECT_EQ(paramBool, hwInfoConfig->pipeControlWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, hwInfoConfig->imagePitchAlignmentWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, hwInfoConfig->isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||
}
|
||||
}
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
|
||||
}
|
||||
|
||||
using TgllpHwInfo = ::testing::Test;
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenBoolWhenCallTgllpHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) {
|
||||
static bool boolValue[]{
|
||||
true, false};
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
FeatureTable &featureTable = hwInfo.featureTable;
|
||||
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;
|
||||
|
||||
uint64_t configs[] = {
|
||||
0x100060010,
|
||||
0x100020010};
|
||||
|
||||
for (auto &config : configs) {
|
||||
for (auto setParamBool : boolValue) {
|
||||
|
||||
gtSystemInfo = {0};
|
||||
featureTable = {};
|
||||
workaroundTable = {};
|
||||
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config);
|
||||
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrSVM);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrIA32eGfxPTEs);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrStandardMipTailFormat);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrTranslationTable);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrUserModeTranslationTable);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrTileMappedResource);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrFbc);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrTileY);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrAstcHdr2D);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrAstcLdr2D);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt);
|
||||
EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt);
|
||||
|
||||
EXPECT_EQ(setParamBool, workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface);
|
||||
EXPECT_EQ(setParamBool, workaroundTable.flags.waUntypedBufferCompression);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenHwInfoConfigStringThenAfterSetupResultingVmeIsDisabled) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
|
||||
uint64_t config = 0x100060010;
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, config);
|
||||
EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler);
|
||||
EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption);
|
||||
EXPECT_FALSE(hwInfo.capabilityTable.supportsVme);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenSetCommandStreamReceiverInAubModeForTgllpProductFamilyWhenPrepareDeviceEnvironmentsForProductFamilyOverrideIsCalledThenAubCenterIsInitializedCorrectly) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(1);
|
||||
DebugManager.flags.ProductFamilyOverride.set("tgllp");
|
||||
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
|
||||
bool success = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(executionEnvironment);
|
||||
ASSERT_TRUE(success);
|
||||
|
||||
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
|
||||
|
||||
EXPECT_TRUE(rootDeviceEnvironment->initAubCenterCalled);
|
||||
EXPECT_FALSE(rootDeviceEnvironment->localMemoryEnabledReceived);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenSetCommandStreamReceiverInAubModeWithOverrideGpuAddressSpaceWhenPrepareDeviceEnvironmentsForProductFamilyOverrideIsCalledThenAubManagerIsInitializedWithCorrectGpuAddressSpace) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(1);
|
||||
DebugManager.flags.ProductFamilyOverride.set("tgllp");
|
||||
DebugManager.flags.OverrideGpuAddressSpace.set(48);
|
||||
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
|
||||
bool success = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(executionEnvironment);
|
||||
ASSERT_TRUE(success);
|
||||
|
||||
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
|
||||
|
||||
auto mockAubManager = static_cast<MockAubManager *>(rootDeviceEnvironment->aubCenter->getAubManager());
|
||||
EXPECT_EQ(MemoryConstants::max48BitAddress, mockAubManager->mockAubManagerParams.gpuAddressSpace);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenSetCommandStreamReceiverInAubModeWhenPrepareDeviceEnvironmentsForProductFamilyOverrideIsCalledThenAllRootDeviceEnvironmentMembersAreInitialized) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
auto requiredDeviceCount = 2u;
|
||||
DebugManager.flags.CreateMultipleRootDevices.set(requiredDeviceCount);
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(1);
|
||||
DebugManager.flags.ProductFamilyOverride.set("tgllp");
|
||||
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get(), true, requiredDeviceCount);
|
||||
|
||||
bool success = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(executionEnvironment);
|
||||
ASSERT_TRUE(success);
|
||||
|
||||
std::set<MemoryOperationsHandler *> memoryOperationHandlers;
|
||||
for (auto rootDeviceIndex = 0u; rootDeviceIndex < requiredDeviceCount; rootDeviceIndex++) {
|
||||
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[rootDeviceIndex].get());
|
||||
EXPECT_TRUE(rootDeviceEnvironment->initAubCenterCalled);
|
||||
EXPECT_FALSE(rootDeviceEnvironment->localMemoryEnabledReceived);
|
||||
|
||||
auto memoryOperationInterface = rootDeviceEnvironment->memoryOperationsInterface.get();
|
||||
EXPECT_NE(nullptr, memoryOperationInterface);
|
||||
EXPECT_EQ(memoryOperationHandlers.end(), memoryOperationHandlers.find(memoryOperationInterface));
|
||||
memoryOperationHandlers.insert(memoryOperationInterface);
|
||||
}
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenTgllpWhenObtainingBlitterPreferenceThenReturnFalse) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
const auto &hardwareInfo = *defaultHwInfo;
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenHwInfoConfigWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_EQ(hwInfoConfig.getProductConfigFromHwInfo(hwInfo), AOT::TGL);
|
||||
}
|
@ -7,16 +7,21 @@
|
||||
if(TESTS_GEN9)
|
||||
target_sources(neo_shared_tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen9_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/preamble_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sip_tests_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_command_encoder_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_gen9.cpp
|
||||
)
|
||||
|
||||
add_subdirectories()
|
||||
|
@ -7,6 +7,7 @@
|
||||
if(TESTS_BXT)
|
||||
target_sources(neo_shared_tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_tests_bxt.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_bxt.cpp
|
||||
)
|
||||
|
||||
|
@ -5,17 +5,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_bxt.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> DeviceTest;
|
||||
using DeviceBxtTest = Test<DeviceFixture>;
|
||||
|
||||
BXTTEST_F(DeviceTest, givenBxtDeviceWhenAskedForProflingTimerResolutionThen52IsReturned) {
|
||||
BXTTEST_F(DeviceBxtTest, givenBxtDeviceWhenAskedForProflingTimerResolutionThen52IsReturned) {
|
||||
auto resolution = pDevice->getProfilingTimerResolution();
|
||||
EXPECT_DOUBLE_EQ(52.083, resolution);
|
||||
}
|
@ -7,16 +7,15 @@
|
||||
|
||||
#include "shared/source/gen9/hw_cmds.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> Gen9SamplerTest;
|
||||
using Gen9SamplerTest = ::testing::Test;
|
||||
|
||||
GEN9TEST_F(Gen9SamplerTest, WhenAppendingSamplerStateParamsThenStateIsNotChanged) {
|
||||
typedef typename FamilyType::SAMPLER_STATE SAMPLER_STATE;
|
@ -7,6 +7,7 @@
|
||||
if(TESTS_SKL)
|
||||
target_sources(neo_shared_tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_tests_skl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_skl.cpp
|
||||
)
|
||||
|
||||
|
@ -5,17 +5,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_skl.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> DeviceTest;
|
||||
using DeviceSklTest = Test<DeviceFixture>;
|
||||
|
||||
SKLTEST_F(DeviceTest, givenSklDeviceWhenAskedForProflingTimerResolutionThen83IsReturned) {
|
||||
SKLTEST_F(DeviceSklTest, givenSklDeviceWhenAskedForProflingTimerResolutionThen83IsReturned) {
|
||||
auto resolution = pDevice->getProfilingTimerResolution();
|
||||
EXPECT_DOUBLE_EQ(83.333, resolution);
|
||||
}
|
@ -7,51 +7,13 @@
|
||||
|
||||
#include "shared/source/gen9/hw_cmds.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> Gen9DeviceCaps;
|
||||
|
||||
GEN9TEST_F(Gen9DeviceCaps, WhenCheckingExtensionStringThenFp64CorrectlyReported) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
std::string extensionString = caps.deviceExtensions;
|
||||
if (pDevice->getHardwareInfo().capabilityTable.ftrSupportsFP64) {
|
||||
EXPECT_NE(std::string::npos, extensionString.find(std::string("cl_khr_fp64")));
|
||||
EXPECT_NE(0u, caps.doubleFpConfig);
|
||||
} else {
|
||||
EXPECT_EQ(std::string::npos, extensionString.find(std::string("cl_khr_fp64")));
|
||||
EXPECT_EQ(0u, caps.doubleFpConfig);
|
||||
}
|
||||
}
|
||||
|
||||
GEN9TEST_F(Gen9DeviceCaps, givenGen9WhenCheckExtensionsThenDeviceProperlyReportsClKhrSubgroupsExtension) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups")));
|
||||
} else {
|
||||
EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups")));
|
||||
}
|
||||
}
|
||||
|
||||
GEN9TEST_F(Gen9DeviceCaps, givenGen9WhenCheckingCapsThenDeviceDoesProperlyReportsIndependentForwardProgress) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
|
||||
if (pClDevice->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_TRUE(caps.independentForwardProgress != 0);
|
||||
} else {
|
||||
EXPECT_FALSE(caps.independentForwardProgress != 0);
|
||||
}
|
||||
}
|
||||
|
||||
GEN9TEST_F(Gen9DeviceCaps, WhenGettingDeviceInfoThenCorrectlyRoundedDivideSqrtIsEnabled) {
|
||||
const auto &caps = pClDevice->getDeviceInfo();
|
||||
EXPECT_NE(0u, caps.singleFpConfig & CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT);
|
||||
}
|
||||
using Gen9DeviceCaps = Test<DeviceFixture>;
|
||||
|
||||
GEN9TEST_F(Gen9DeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenMidThreadIsSupported) {
|
||||
EXPECT_EQ(PreemptionMode::MidThread, pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode);
|
@ -5,16 +5,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> Gen9OnlyTest;
|
||||
using Gen9OnlyTest = ::testing::Test;
|
||||
|
||||
GEN9TEST_F(Gen9OnlyTest, WhenGettingRenderCoreFamilyThenGen9CoreIsReturned) {
|
||||
EXPECT_EQ(IGFX_GEN9_CORE, pDevice->getRenderCoreFamily());
|
||||
EXPECT_EQ(IGFX_GEN9_CORE, defaultHwInfo->platform.eRenderCoreFamily);
|
||||
}
|
Reference in New Issue
Block a user