-
Notifications
You must be signed in to change notification settings - Fork 697
pytorch-engine:0.18.0 causes memory leak when using NDManager.newBaseManager() #1886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
bug
Something isn't working
Comments
925781609
pushed a commit
to 925781609/djl
that referenced
this issue
Aug 10, 2022
zachgk
added a commit
to zachgk/djl
that referenced
this issue
Aug 10, 2022
fixes deepjavalibrary#1886 This creates an interface for SystemNDManagers. That way, the behavior of skipping over various functions can be moved to the BaseNDManager instead of each individual SystemManager
Thanks for your fix contribution, we will track on that |
frankfliu
added a commit
that referenced
this issue
Aug 10, 2022
* [fix]: fix memory leak when using NDManager.newBaseManager() create NDManager (#1886) * Fixes compile issue for other engines Change-Id: Id034fb17ecf918be381c725deeb557e528d3ef65 Co-authored-by: Liu,Yang <yliu37@trip.com> Co-authored-by: Frank Liu <frankfliu2000@gmail.com>
patins1
pushed a commit
to patins1/djl
that referenced
this issue
Aug 26, 2022
…ary#1887) * [fix]: fix memory leak when using NDManager.newBaseManager() create NDManager (deepjavalibrary#1886) * Fixes compile issue for other engines Change-Id: Id034fb17ecf918be381c725deeb557e528d3ef65 Co-authored-by: Liu,Yang <yliu37@trip.com> Co-authored-by: Frank Liu <frankfliu2000@gmail.com>
zachgk
added a commit
to zachgk/djl
that referenced
this issue
Sep 9, 2022
fixes deepjavalibrary#1886 This creates an interface for SystemNDManagers. That way, the behavior of skipping over various functions can be moved to the BaseNDManager instead of each individual SystemManager
zachgk
added a commit
that referenced
this issue
Sep 12, 2022
* Creates a SystemNDManager interface fixes #1886 This creates an interface for SystemNDManagers. That way, the behavior of skipping over various functions can be moved to the BaseNDManager instead of each individual SystemManager * Updated LightGBM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
NDManager.newBaseManager()
creates aPtNDManager
, it will callai.djl.pytorch.engine.PtNDManager#newSubManager
, and execute:attachUncappedInternal
is implemented byBaseNDManager
and attaches the created PtNDManager to its fieldresources
.The
parent
isPtNDManager$SystemManager
and parent'sdetachInternal
does nothing.So in the end, the created PtNDManger will not be sweeped by JVM GC.
newSubManager
callsPtNDManager$SystemManger#attachInternal
.PtNDManager$SystemManger#attachInternal
does nothing.Expected Behavior
The
SystemManager
will not attach the created PtNDManger to its fieldresources
or release PtNDManger when it is closed.Error Message
How to Reproduce?
The text was updated successfully, but these errors were encountered: