Skip to content

Commit 2e4f5d5

Browse files
[SYCL] Fix wrong loop in deferred buffer release (#11791)
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent 52556d8 commit 2e4f5d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sycl/source/detail/scheduler/scheduler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,9 @@ void Scheduler::releaseResources(BlockingT Blocking) {
419419
// queue_impl, ~queue_impl is called and buffer for assert (which is created
420420
// with size only so all confitions for deferred release are satisfied) is
421421
// added to deferred mem obj storage. So we may end up with leak.
422-
while (!isDeferredMemObjectsEmpty())
422+
do {
423423
cleanupDeferredMemObjects(Blocking);
424+
} while (Blocking == BlockingT::BLOCKING && !isDeferredMemObjectsEmpty());
424425
}
425426

426427
MemObjRecord *Scheduler::getMemObjRecord(const Requirement *const Req) {

0 commit comments

Comments
 (0)