mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 07:44:16 +08:00
fix: Adjust waitpkg threshold to 20 us
Resolves: HSD-13012958900 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9106695559
commit
5d2b673ef6
@@ -26,7 +26,7 @@ enum class WaitpkgUse : int32_t {
|
||||
tpause
|
||||
};
|
||||
|
||||
constexpr int64_t defaultWaitPkgThresholdInMicroSeconds = 12;
|
||||
constexpr int64_t defaultWaitPkgThresholdInMicroSeconds = 20;
|
||||
constexpr int64_t defaultWaitPkgThresholdForDiscreteInMicroSeconds = 28;
|
||||
constexpr uint64_t defaultCounterValue = 16000;
|
||||
constexpr uint32_t defaultControlValue = 0;
|
||||
|
||||
@@ -117,7 +117,7 @@ TEST_F(WaitPkgTest, givenDefaultSettingsAndWaitpkgSupportTrueWhenWaitInitialized
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::uninitialized);
|
||||
EXPECT_EQ(12, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(20, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
|
||||
EXPECT_EQ(expectedWaitpkgSupport, WaitUtils::waitpkgSupport);
|
||||
|
||||
@@ -140,7 +140,7 @@ TEST_F(WaitPkgTest, givenEnabledWaitPkgSettingsAndWaitpkgSupportFalseWhenWaitIni
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::noUse);
|
||||
EXPECT_EQ(12, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(20, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgTest, givenDisabledWaitPkgSettingsAndWaitpkgSupportTrueWhenWaitInitializedThenWaitPkgNotEnabled) {
|
||||
@@ -153,7 +153,7 @@ TEST_F(WaitPkgTest, givenDisabledWaitPkgSettingsAndWaitpkgSupportTrueWhenWaitIni
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::noUse);
|
||||
EXPECT_EQ(12, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(20, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgTest, givenEnabledWaitPkgSettingsAndWaitpkgSupportTrueWhenWaitInitializedAndCpuDoesNotSupportOperandThenWaitPkgNotEnabled) {
|
||||
@@ -168,7 +168,7 @@ TEST_F(WaitPkgTest, givenEnabledWaitPkgSettingsAndWaitpkgSupportTrueWhenWaitInit
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::noUse);
|
||||
EXPECT_EQ(12, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(20, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgTest, givenEnabledWaitPkgSettingsAndWaitpkgSupportTrueWhenWaitInitializedAndCpuSupportsOperandThenWaitPkgEnabled) {
|
||||
@@ -184,7 +184,7 @@ TEST_F(WaitPkgTest, givenEnabledWaitPkgSettingsAndWaitpkgSupportTrueWhenWaitInit
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::umonitorAndUmwait);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 12 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 20 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgTest, givenEnabledWaitPkgSetToTpauseAndWaitpkgSupportTrueWhenWaitInitializedAndCpuSupportsOperandThenWaitPkgEnabled) {
|
||||
@@ -200,7 +200,7 @@ TEST_F(WaitPkgTest, givenEnabledWaitPkgSetToTpauseAndWaitpkgSupportTrueWhenWaitI
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::tpause);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 12 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 20 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgTest, givenWaitpkgSupportTrueWhenCreateExecutionEnvironmentThenWaitPkgEnabled) {
|
||||
@@ -214,7 +214,7 @@ TEST_F(WaitPkgTest, givenWaitpkgSupportTrueWhenCreateExecutionEnvironmentThenWai
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::tpause);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 12 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 20 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgTest, givenWaitpkgSupportTrueWhenCreateDevicesThenWaitPkgEnabled) {
|
||||
@@ -231,7 +231,7 @@ TEST_F(WaitPkgTest, givenWaitpkgSupportTrueWhenCreateDevicesThenWaitPkgEnabled)
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::tpause);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 12 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 20 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgTest, givenWaitpkgSupportTrueWhenPrepareDeviceEnvironmentsThenWaitPkgEnabled) {
|
||||
@@ -246,7 +246,7 @@ TEST_F(WaitPkgTest, givenWaitpkgSupportTrueWhenPrepareDeviceEnvironmentsThenWait
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::tpause);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 12 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 20 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgTest, givenEnabledWaitPkgSetToTpauseAndWaitpkgThresholdAndWaitpkgSupportTrueWhenWaitInitializedAndCpuSupportsOperandThenWaitPkgEnabled) {
|
||||
@@ -277,7 +277,7 @@ TEST_F(WaitPkgTest, givenEnabledSetToTrueAndWaitpkgSupportTrueWhenWaitInitialize
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::umonitorAndUmwait);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 12 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 20 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgTest, givenEnabledSetToTpauseAndWaitpkgSupportTrueWhenWaitInitializedAndCpuSupportsOperandThenWaitPkgEnabled) {
|
||||
@@ -291,7 +291,7 @@ TEST_F(WaitPkgTest, givenEnabledSetToTpauseAndWaitpkgSupportTrueWhenWaitInitiali
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::tpause);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 12 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 20 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgTest, givenFullyEnabledWaitPkgAndOverrideCounterValueWhenWaitInitializedThenNewCounterValueSet) {
|
||||
@@ -307,7 +307,7 @@ TEST_F(WaitPkgTest, givenFullyEnabledWaitPkgAndOverrideCounterValueWhenWaitIniti
|
||||
EXPECT_EQ(1234u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::umonitorAndUmwait);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 12 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 20 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgTest, givenFullyEnabledWaitPkgAndOverrideControlValueWhenWaitInitializedThenNewControlValueSet) {
|
||||
@@ -323,7 +323,7 @@ TEST_F(WaitPkgTest, givenFullyEnabledWaitPkgAndOverrideControlValueWhenWaitIniti
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(1u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::umonitorAndUmwait);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 12 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 20 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgTest, givenEnabledWaitPkgSettingsAndWaitpkgSupportTrueWhenWaitInitializedTwiceThenInitOnce) {
|
||||
@@ -337,7 +337,7 @@ TEST_F(WaitPkgTest, givenEnabledWaitPkgSettingsAndWaitpkgSupportTrueWhenWaitInit
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::umonitorAndUmwait);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 12 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 20 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
|
||||
debugManager.flags.WaitpkgControlValue.set(1);
|
||||
|
||||
@@ -347,7 +347,7 @@ TEST_F(WaitPkgTest, givenEnabledWaitPkgSettingsAndWaitpkgSupportTrueWhenWaitInit
|
||||
EXPECT_EQ(16000u, WaitUtils::waitpkgCounterValue);
|
||||
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
|
||||
EXPECT_EQ(WaitUtils::waitpkgUse, WaitUtils::WaitpkgUse::umonitorAndUmwait);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 12 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
EXPECT_EQ(defaultHwInfo->capabilityTable.isIntegratedDevice ? 20 : 28, WaitUtils::waitPkgThresholdInMicroSeconds);
|
||||
}
|
||||
|
||||
TEST_F(WaitPkgEnabledTest, givenMonitoredAddressChangedWhenAddressMatchesPredicateValueThenWaitReturnsTrue) {
|
||||
|
||||
Reference in New Issue
Block a user