SWDEV-345683 - Fix HIP out of memory

If for every eventRecord handler is not submitted,
memory is not getting released during hipFree and leads to OOM.

Change-Id: I19b61a0c523502e9e1a3564ce8b791f3e2cea02c


[ROCm/clr commit: 7b1c6d06d5]
Этот коммит содержится в:
Anusha Godavarthy Surya
2022-07-24 21:55:53 -07:00
коммит произвёл Anusha Godavarthy Surya
родитель 11f9cdebba
Коммит b66ec1a031
+2 -2
Просмотреть файл
@@ -336,7 +336,7 @@ void Command::releaseResources() {
}
}
static constexpr uint32_t kMarkerTsCount = 64;
static constexpr uint32_t kMarkerTsCount = 1;
// ================================================================================================
void Command::enqueue() {
assert(queue_ != NULL && "Cannot be enqueued");
@@ -372,7 +372,7 @@ void Command::enqueue() {
bool submitBatch = !profilingInfo().marker_ts_;
// Flush the batch if ther marker_ts have been continuously submitted until a threashold
// is reached. This helps recycling the commands and frees memory.
if (queue_->GetMarkerTsCount() > kMarkerTsCount) {
if (queue_->GetMarkerTsCount() >= kMarkerTsCount) {
submitBatch = true;
queue_->ResetMarkerTsCount();
}