refactor: prework for adding eu stall support on windows

Related-To: NEO-9492

Signed-off-by: shubham kumar <shubham.kumar@intel.com>
This commit is contained in:
shubham kumar
2024-07-12 15:24:57 +00:00
committed by Compute-Runtime-Automation
parent c589c5d2df
commit e78c8edcf3
11 changed files with 87 additions and 59 deletions

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2019-2023 Intel Corporation
# Copyright (C) 2019-2024 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -34,6 +34,7 @@ if(WIN32)
${CMAKE_CURRENT_SOURCE_DIR}/wddm_special_heap_test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/wddm_memory_reservation_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/wddm_windows_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/${BRANCH_DIR_SUFFIX}/wddm_perf_tests.cpp
)
endif()
@@ -53,4 +54,10 @@ if(WIN32 OR(UNIX AND NOT DISABLE_WDDM_LINUX))
)
endif()
if(NOT WIN32 AND NOT DISABLE_WDDM_LINUX)
target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/wddm_perf_tests.cpp
)
endif()
add_subdirectories()

View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/os_interface/windows/wddm_fixture.h"
namespace NEO {
using WddmPerfTests = WddmFixture;
TEST_F(WddmPerfTests, givenCorrectArgumentsWhenPerfOpenEuStallStreamIsCalledThenReturnFailure) {
constexpr uint32_t samplingGranularity = 251u;
constexpr uint32_t gpuClockPeriodNs = 1000000000ull;
constexpr uint32_t samplingUnit = 1;
uint32_t notifyEveryNReports = 0, samplingPeriodNs = samplingGranularity * samplingUnit * gpuClockPeriodNs;
EXPECT_FALSE(wddm->perfOpenEuStallStream(notifyEveryNReports, samplingPeriodNs));
}
TEST_F(WddmPerfTests, givenCorrectArgumentsWhenPerfReadEuStallStreamIsCalledThenReturnFailure) {
uint8_t pRawData = 0u;
size_t pRawDataSize = 0;
EXPECT_FALSE(wddm->perfReadEuStallStream(&pRawData, &pRawDataSize));
}
TEST_F(WddmPerfTests, givenCorrectArgumentsWhenPerfDisableEuStallStreamIsCalledThenReturnFailure) {
EXPECT_FALSE(wddm->perfDisableEuStallStream());
}
} // namespace NEO