mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
performance: Adjust waitpkg threshold for discrete devices
Related-To: NEO-14336 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a89113fa1a
commit
60b551758c
@@ -8,6 +8,7 @@
|
||||
#include "shared/source/utilities/wait_util.h"
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/utilities/cpu_info.h"
|
||||
|
||||
namespace NEO {
|
||||
@@ -27,7 +28,7 @@ bool waitpkgSupport = SUPPORTS_WAITPKG;
|
||||
bool waitpkgSupport = false;
|
||||
#endif
|
||||
|
||||
void init(WaitpkgUse inputWaitpkgUse) {
|
||||
void init(WaitpkgUse inputWaitpkgUse, const HardwareInfo &hwInfo) {
|
||||
if (debugManager.flags.WaitLoopCount.get() != -1) {
|
||||
waitCount = debugManager.flags.WaitLoopCount.get();
|
||||
}
|
||||
@@ -47,6 +48,10 @@ void init(WaitpkgUse inputWaitpkgUse) {
|
||||
|
||||
waitpkgUse = inputWaitpkgUse;
|
||||
|
||||
if (!hwInfo.capabilityTable.isIntegratedDevice) {
|
||||
waitPkgThresholdInMicroSeconds = WaitUtils::defaultWaitPkgThresholdForDiscreteInMicroSeconds;
|
||||
}
|
||||
|
||||
if (waitpkgUse == WaitpkgUse::umonitorAndUmwait) {
|
||||
waitCount = 0u;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
struct HardwareInfo;
|
||||
|
||||
namespace WaitUtils {
|
||||
|
||||
enum class WaitpkgUse : int32_t {
|
||||
@@ -25,6 +27,7 @@ enum class WaitpkgUse : int32_t {
|
||||
};
|
||||
|
||||
constexpr int64_t defaultWaitPkgThresholdInMicroSeconds = 12;
|
||||
constexpr int64_t defaultWaitPkgThresholdForDiscreteInMicroSeconds = 28;
|
||||
constexpr uint64_t defaultCounterValue = 16000;
|
||||
constexpr uint32_t defaultControlValue = 0;
|
||||
constexpr uint32_t defaultWaitCount = 1u;
|
||||
@@ -77,7 +80,7 @@ inline bool waitFunction(volatile TagAddressType *pollAddress, TaskCountType exp
|
||||
return waitFunctionWithPredicate<TaskCountType>(pollAddress, expectedValue, std::greater_equal<TaskCountType>(), timeElapsedSinceWaitStarted);
|
||||
}
|
||||
|
||||
void init(WaitpkgUse inputWaitpkgUse);
|
||||
void init(WaitpkgUse inputWaitpkgUse, const HardwareInfo &hwInfo);
|
||||
} // namespace WaitUtils
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user