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
This commit is contained in:
committed by
Anusha Godavarthy Surya
parent
2e98e163a6
commit
7b1c6d06d5
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user