mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Add PVC hwinfo config test for Thread Eu ratio
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
7f6296174c
commit
7c068cb05b
@ -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
|
||||
)
|
||||
|
@ -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));
|
||||
}
|
Reference in New Issue
Block a user