SWDEV-334150 - Force callback to cycle commands

Enqueue a handler callback for hipEventRecords(aka marker_ts_) for every
64 submits, This recycles the memory if we dont end up calling
synchronize for the longest time.

Change-Id: I3d39fe76d52a5d81387927edd85b5663b563682c
Esse commit está contido em:
Saleel Kudchadker
2022-04-27 11:13:41 -07:00
commit fa76f03654
3 arquivos alterados com 23 adições e 2 exclusões
+11
Ver Arquivo
@@ -264,6 +264,9 @@ class HostQueue : public CommandQueue {
// an invalid access
command->retain();
if (command->profilingInfo().marker_ts_) {
markerTsCount_++;
}
// Release the last command in the batch
if (lastEnqueueCommand_ != nullptr) {
lastEnqueueCommand_->release();
@@ -284,12 +287,20 @@ class HostQueue : public CommandQueue {
//! Get queue status
bool GetQueueStatus() { return isActive_; }
//! Get markerTsCount
uint32_t GetMarkerTsCount() const { return markerTsCount_; }
//! Reset counter
void ResetMarkerTsCount() { markerTsCount_ = 0; }
private:
Command* head_; //!< Head of the batch list
Command* tail_; //!< Tail of the batch list
//! True if this command queue is active
bool isActive_;
uint32_t markerTsCount_; //!< Count of TS markers
};