mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Add timestamp WA for DG2+WSL2
Related-To: NEO-6391 Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
65255ea38f
commit
8540aaff1c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -160,4 +160,9 @@ uint32_t HwInfoConfigHw<gfxProduct>::computeMaxNeededSubSliceSpace(const Hardwar
|
||||
UNRECOVERABLE_IF(true);
|
||||
}
|
||||
return maxSubSlice;
|
||||
}
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<gfxProduct>::convertTimestampsFromOaToCsDomain(uint64_t ×tampData) {
|
||||
timestampData >>= 1;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -31,10 +31,5 @@ int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OS
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<gfxProduct>::convertTimestampsFromOaToCsDomain(uint64_t ×tampData) {
|
||||
timestampData >>= 1;
|
||||
}
|
||||
|
||||
template class HwInfoConfigHw<gfxProduct>;
|
||||
} // namespace NEO
|
||||
|
||||
@@ -8,6 +8,7 @@ if(TESTS_DG2)
|
||||
target_sources(neo_shared_tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_dg2.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests_dg2.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) 2021-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 HwInfoConfigTestDg2 = ::testing::Test;
|
||||
|
||||
DG2TEST_F(HwInfoConfigTestDg2, whenConvertingTimestampsToCsDomainThenGpuTicksAreShifted) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
uint64_t gpuTicks = 0x12345u;
|
||||
|
||||
auto expectedGpuTicks = gpuTicks >> 1;
|
||||
|
||||
hwInfoConfig->convertTimestampsFromOaToCsDomain(gpuTicks);
|
||||
EXPECT_EQ(expectedGpuTicks, gpuTicks);
|
||||
}
|
||||
Reference in New Issue
Block a user