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


[ROCm/clr commit: fa76f03654]
Este cometimento está contido em:
Saleel Kudchadker cometeu 2022-04-28 12:30:23 -04:00
1 ascendente d5bc650de9
cometimento 29752a2bbc
3 ficheiros modificados
+23 -2

Não existem ficheiros que correspondam à sua pesquisa

+11
Ver ficheiro
@@ -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
};