mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
performance: Enable waitpkg with tpause
Resolves: NEO-14336 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
28dd4cf4d8
commit
7c75807987
@@ -30,7 +30,7 @@
|
||||
|
||||
namespace NEO {
|
||||
ExecutionEnvironment::ExecutionEnvironment() {
|
||||
WaitUtils::init(WaitUtils::WaitpkgUse::noUse);
|
||||
WaitUtils::init(WaitUtils::WaitpkgUse::tpause);
|
||||
this->configureNeoEnvironment();
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user