-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Memory Consumption Too High #302
Comments
@maleadt You said on slack that perhaps references are being kept longer than they need to in Julia/Flux, since we do a complete gc scan when we have memory pressure. Copying you here in case my understanding is incorrect. |
That is correct, see https://github.com/JuliaGPU/CuArrays.jl/blob/e06ab7cf63bd249ef10a3511cde0df39d1463a05/src/memory.jl#L210-L238 I guess we could add a debug mode that keeps track of the stack trace for every allocation and dumps live ones when when encountering a true OOM situation. I'll have a look once there's 0.7 compatibility. |
Not sure if this is fixed but the situation has changed significantly (e.g. we have #465 and lots of CuArrays improvements). We can figure out other things as they come up. |
The actual model I used for testing was a ResNet152 model which runs out of memory at around 4 batchsize for Flux. A small repro for the issue would be
A pytorch equivalent for the above would be
The models were tested on a 16GB P100 GPU. Also the pytorch code runs fine a 12GB 1080Ti GPU
The text was updated successfully, but these errors were encountered: