mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
Revert "fix: ulls controller sleep, windows"
This reverts commit 6455d4648c.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
956dd8e17d
commit
5dbbaa39b9
@@ -219,7 +219,6 @@ set(neo_libult_SRCS_WINDOWS
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/options.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/setup_external_dependencies_drm_or_wddm.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/sys_calls.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/sys_calls_winmm.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/wddm_calls.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/mock_environment_variables.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/mock_environment_variables.h
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "sys_calls_winmm.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
namespace SysCalls {
|
||||
|
||||
size_t timeBeginPeriodCalled = 0u;
|
||||
UINT timeBeginPeriodLastValue = 0u;
|
||||
size_t timeEndPeriodCalled = 0u;
|
||||
UINT timeEndPeriodLastValue = 0u;
|
||||
|
||||
MMRESULT timeBeginPeriod(UINT period) {
|
||||
timeBeginPeriodCalled++;
|
||||
timeBeginPeriodLastValue = period;
|
||||
return 0u;
|
||||
}
|
||||
|
||||
MMRESULT timeEndPeriod(UINT period) {
|
||||
timeEndPeriodCalled++;
|
||||
timeEndPeriodLastValue = period;
|
||||
return 0u;
|
||||
}
|
||||
|
||||
} // namespace SysCalls
|
||||
} // namespace NEO
|
||||
@@ -30,14 +30,10 @@ struct DirectSubmissionControllerMock : public DirectSubmissionController {
|
||||
using DirectSubmissionController::timeSinceLastCheck;
|
||||
|
||||
bool sleep(std::unique_lock<std::mutex> &lock) override {
|
||||
auto ret = sleepReturnValue.load();
|
||||
this->sleepCalled = true;
|
||||
if (callBaseSleepMethod) {
|
||||
return DirectSubmissionController::sleep(lock);
|
||||
} else {
|
||||
auto ret = sleepReturnValue.load();
|
||||
sleepReturnValue.store(false);
|
||||
return ret;
|
||||
}
|
||||
sleepReturnValue.store(false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
SteadyClock::time_point getCpuTimestamp() override {
|
||||
@@ -57,6 +53,5 @@ struct DirectSubmissionControllerMock : public DirectSubmissionController {
|
||||
std::atomic<bool> sleepReturnValue{false};
|
||||
std::atomic<bool> timeoutElapsedReturnValue{false};
|
||||
std::atomic<bool> timeoutElapsedCallBase{false};
|
||||
bool callBaseSleepMethod = false;
|
||||
};
|
||||
} // namespace NEO
|
||||
@@ -10,29 +10,21 @@
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/flush_stamp.h"
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
#include "shared/source/os_interface/windows/sys_calls.h"
|
||||
#include "shared/source/os_interface/windows/wddm/wddm_residency_logger.h"
|
||||
#include "shared/source/os_interface/windows/wddm_memory_manager.h"
|
||||
#include "shared/source/os_interface/windows/wddm_residency_controller.h"
|
||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/helpers/variable_backup.h"
|
||||
#include "shared/test/common/mocks/mock_io_functions.h"
|
||||
#include "shared/test/common/mocks/mock_os_context_win.h"
|
||||
#include "shared/test/common/os_interface/windows/wddm_fixture.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
#include "shared/test/unit_test/direct_submission/direct_submission_controller_mock.h"
|
||||
#include "shared/test/unit_test/mocks/windows/mock_wddm_direct_submission.h"
|
||||
extern uint64_t cpuFence;
|
||||
namespace NEO {
|
||||
|
||||
namespace SysCalls {
|
||||
extern size_t timeBeginPeriodCalled;
|
||||
extern MMRESULT timeBeginPeriodLastValue;
|
||||
extern size_t timeEndPeriodCalled;
|
||||
extern MMRESULT timeEndPeriodLastValue;
|
||||
} // namespace SysCalls
|
||||
using namespace NEO;
|
||||
|
||||
extern uint64_t cpuFence;
|
||||
|
||||
template <PreemptionMode preemptionMode>
|
||||
struct WddmDirectSubmissionFixture : public WddmFixture {
|
||||
@@ -1138,22 +1130,4 @@ HWTEST_F(WddmDirectSubmissionTest, givenDirectSubmissionWhenUnblockPagingFenceSe
|
||||
|
||||
wddmDirectSubmission.unblockPagingFenceSemaphore(pagingFenceValueToWait);
|
||||
EXPECT_GT(wddmDirectSubmission.semaphoreData->pagingFenceCounter, mockedPagingFence);
|
||||
}
|
||||
|
||||
TEST(DirectSubmissionControllerWindowsTest, givenDirectSubmissionControllerWhenCallingSleepThenRequestHighResolutionTimers) {
|
||||
VariableBackup<size_t> timeBeginPeriodCalledBackup(&SysCalls::timeBeginPeriodCalled, 0u);
|
||||
VariableBackup<MMRESULT> timeBeginPeriodLastValueBackup(&SysCalls::timeBeginPeriodLastValue, 0u);
|
||||
VariableBackup<size_t> timeEndPeriodCalledBackup(&SysCalls::timeEndPeriodCalled, 0u);
|
||||
VariableBackup<MMRESULT> timeEndPeriodLastValueBackup(&SysCalls::timeEndPeriodLastValue, 0u);
|
||||
|
||||
DirectSubmissionControllerMock controller;
|
||||
controller.callBaseSleepMethod = true;
|
||||
std::unique_lock<std::mutex> lock(controller.condVarMutex);
|
||||
controller.sleep(lock);
|
||||
EXPECT_TRUE(controller.sleepCalled);
|
||||
EXPECT_EQ(1u, SysCalls::timeBeginPeriodCalled);
|
||||
EXPECT_EQ(1u, SysCalls::timeEndPeriodCalled);
|
||||
EXPECT_EQ(1u, SysCalls::timeBeginPeriodLastValue);
|
||||
EXPECT_EQ(1u, SysCalls::timeEndPeriodLastValue);
|
||||
}
|
||||
} // namespace NEO
|
||||
}
|
||||
Reference in New Issue
Block a user