Skip to content

Commit 7c068cb

Browse files
Add PVC hwinfo config test for Thread Eu ratio
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
1 parent 7f62961 commit 7c068cb

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

shared/test/common/xe_hpc_core/pvc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ if(TESTS_PVC)
88
set(NEO_CORE_TESTS_XE_HPC_CORE_PVC
99
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
1010
${CMAKE_CURRENT_SOURCE_DIR}/test_encode_dispatch_kernel_pvc.cpp
11+
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_pvc.cpp
1112
${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_pvc.cpp
1213
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_pvc.cpp
1314
)
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 PVCHwInfoConfig = ::testing::Test;
15+
16+
PVCTEST_F(PVCHwInfoConfig, givenPVCRevId3AndAboveWhenGettingThreadEuRatioForScratchThen16IsReturned) {
17+
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
18+
auto hwInfo = *defaultHwInfo;
19+
hwInfo.platform.usRevId = 3;
20+
EXPECT_EQ(16u, hwInfoConfig.getThreadEuRatioForScratch(hwInfo));
21+
22+
hwInfo.platform.usRevId = 4;
23+
EXPECT_EQ(16u, hwInfoConfig.getThreadEuRatioForScratch(hwInfo));
24+
}
25+
26+
PVCTEST_F(PVCHwInfoConfig, givenPVCRevId0WhenGettingThreadEuRatioForScratchThen8IsReturned) {
27+
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
28+
auto hwInfo = *defaultHwInfo;
29+
hwInfo.platform.usRevId = 0;
30+
EXPECT_EQ(8u, hwInfoConfig.getThreadEuRatioForScratch(hwInfo));
31+
}

0 commit comments

Comments
 (0)