mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
performance: optimize counter based waiting schemes
- store latest waited counter value. - do not wait on values that are already completed. - disable mechanism when counter overflows. Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
205f8d2ffd
commit
4aa7c6c99e
@@ -80,12 +80,20 @@ class InOrderExecInfo : public NEO::NonCopyableClass {
|
||||
|
||||
void reset();
|
||||
bool isExternalMemoryExecInfo() const { return deviceCounterNode == nullptr; }
|
||||
void setLastWaitedCounterValue(uint64_t value) {
|
||||
lastWaitedCounterValue = std::max(value, lastWaitedCounterValue);
|
||||
}
|
||||
|
||||
bool isCounterAlreadyDone(uint64_t waitValue) const {
|
||||
return lastWaitedCounterValue >= waitValue && this->allocationOffset == 0u;
|
||||
}
|
||||
|
||||
protected:
|
||||
NEO::MemoryManager &memoryManager;
|
||||
NEO::TagNodeBase *deviceCounterNode = nullptr;
|
||||
NEO::TagNodeBase *hostCounterNode = nullptr;
|
||||
uint64_t counterValue = 0;
|
||||
uint64_t lastWaitedCounterValue = 0;
|
||||
|
||||
uint64_t regularCmdListSubmissionCounter = 0;
|
||||
uint64_t deviceAddress = 0;
|
||||
|
||||
Reference in New Issue
Block a user