This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
GPU memory leak after using asnumpy() #20315
Comments
leezu
changed the title
GPU memory will not be released after using asnumpy()
GPU memory leak after using asnumpy()
May 27, 2021
@barry-jin what version and platform are you using? |
Hi @lgg The environment information is here
MXNet is 2.0.0 version and built from source with commit hash 978f97e |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Looks like GPU memory will not be released after using
asnumpy()
method for a large mxnet numpy ndarray with gpu context.Code to reproduce:
Before comment out
x.asnumpy()
these two lines:After comment out these two lines:
After change xshape to a relatively smaller one (8, 64, 128, 128), the memory usage looks normal.
Originally posted by @barry-jin in #20262 (comment)
The text was updated successfully, but these errors were encountered: