performance: Enable waitpkg with tpause

Resolves: NEO-14336

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2025-03-21 16:06:11 +00:00
committed by Compute-Runtime-Automation
parent 28dd4cf4d8
commit 7c75807987
2 changed files with 16 additions and 1 deletions

View File

@@ -30,7 +30,7 @@
namespace NEO {
ExecutionEnvironment::ExecutionEnvironment() {
WaitUtils::init(WaitUtils::WaitpkgUse::noUse);
WaitUtils::init(WaitUtils::WaitpkgUse::tpause);
this->configureNeoEnvironment();
}

View File

@@ -9,6 +9,7 @@
#include "shared/source/utilities/wait_util.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/helpers/variable_backup.h"
#include "shared/test/common/mocks/mock_execution_environment.h"
#include "shared/test/common/test_macros/hw_test.h"
#include "shared/test/unit_test/mocks/mock_cpuid_functions.h"
@@ -209,6 +210,20 @@ TEST_F(WaitPkgTest, givenEnabledWaitPkgSetToTpauseAndWaitpkgSupportTrueWhenWaitI
EXPECT_EQ(1, WaitUtils::waitPkgThresholdInMicroSeconds);
}
TEST_F(WaitPkgTest, givenWaitpkgSupportTrueWhenCreateExecutionEnvironmentThenWaitPkgEnabled) {
CpuInfo::cpuidFunc = mockCpuidEnableAll;
WaitUtils::waitpkgSupport = true;
MockExecutionEnvironment executionEnvironment;
EXPECT_EQ(1u, WaitUtils::waitCount);
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::tpause);
EXPECT_EQ(1, WaitUtils::waitPkgThresholdInMicroSeconds);
}
TEST_F(WaitPkgTest, givenEnabledWaitPkgSetToTpauseAndWaitpkgThresholdAndWaitpkgSupportTrueWhenWaitInitializedAndCpuSupportsOperandThenWaitPkgEnabled) {
CpuInfo::cpuidFunc = mockCpuidEnableAll;