Add PVC hwinfo config test for Thread Eu ratio

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2022-04-04 09:56:17 +00:00
committed by Compute-Runtime-Automation
parent 7f6296174c
commit 7c068cb05b
2 changed files with 32 additions and 0 deletions

View File

@ -8,6 +8,7 @@ if(TESTS_PVC)
set(NEO_CORE_TESTS_XE_HPC_CORE_PVC
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/test_encode_dispatch_kernel_pvc.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_pvc.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_pvc.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_pvc.cpp
)

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 PVCHwInfoConfig = ::testing::Test;
PVCTEST_F(PVCHwInfoConfig, givenPVCRevId3AndAboveWhenGettingThreadEuRatioForScratchThen16IsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
auto hwInfo = *defaultHwInfo;
hwInfo.platform.usRevId = 3;
EXPECT_EQ(16u, hwInfoConfig.getThreadEuRatioForScratch(hwInfo));
hwInfo.platform.usRevId = 4;
EXPECT_EQ(16u, hwInfoConfig.getThreadEuRatioForScratch(hwInfo));
}
PVCTEST_F(PVCHwInfoConfig, givenPVCRevId0WhenGettingThreadEuRatioForScratchThen8IsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
auto hwInfo = *defaultHwInfo;
hwInfo.platform.usRevId = 0;
EXPECT_EQ(8u, hwInfoConfig.getThreadEuRatioForScratch(hwInfo));
}