-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parallel_loader: Fix TPU memory leak when calling __iter__.
A TPU memory leak occurs when calling __iter__ on the MpDeviceLoader object, even if called only once. However, the memory growth becomes more noticeable and critical when __iter__ is called repeatedly, eventually leading to a crash. This issue is caused by the threads not being properly terminated because the close() method was not invoked. This commit resolves the issue by ensuring that close() is called, which properly shuts down the threads and prevents memory from leaking.
- Loading branch information
1 parent
0415cc6
commit 984af38
Showing
1 changed file
with
41 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters