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
Этот коммит содержится в:
Saleel Kudchadker
2022-04-27 11:13:41 -07:00
родитель 934149ff0a
Коммит fa76f03654
3 изменённых файлов: 23 добавлений и 2 удалений
+11
Просмотреть файл
@@ -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
};