SWDEV-548417 - Fix Memleaks in Graph (#713)

Co-authored-by: Anusha GodavarthySurya <Anusha.GodavarthySurya@amd.com>
Этот коммит содержится в:
Godavarthy Surya, AnushaиAnusha GodavarthySurya authored and GitHub committed 2025-09-19 17:39:36 +05:30
1 родитель 9f5b390db4
Коммит ce560304a8
21 file changed
+78 -60

No files matched your search

+10 -12
Просмотреть файл
@@ -208,20 +208,18 @@ void HostQueue::finish(bool cpu_wait) {
"await command completion",
minBatchSize);
command->awaitCompletion();
if (IS_HIP) {
ScopedLock sl(vdev()->execution());
ScopedLock l(lastCmdLock_);
// Runtime can clear the last command only if no other submissions occured
// during finish()
if (command == lastEnqueueCommand_) {
device_.removeFromActiveQueues(this);
lastEnqueueCommand_->release();
lastEnqueueCommand_ = nullptr;
}
}
if (IS_HIP) {
ScopedLock sl(vdev()->execution());
ScopedLock l(lastCmdLock_);
// Runtime can clear the last command only if no other submissions occured
// during finish()
if (command == lastEnqueueCommand_) {
device_.removeFromActiveQueues(this);
lastEnqueueCommand_->release();
lastEnqueueCommand_ = nullptr;
}
}
// Release all HW queues, which are idle or nearly idle
vdev()->ReleaseAllHwQueues();