Julia garbage collector does not reclaim GPU memory
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- julia
- Domain
- machine-learning
Research direction
Start with the linked stylenet.jl example and reproduce the executor replacement with nvidia-smi and gc(). Trace how MXNet.jl creates and releases executors and compare that lifecycle with Julia garbage collection. Done means identifying a supported cleanup path or documenting why gc() does not reduce the observed GPU memory usage.
Written by the indexing model from the issue text.
Description
I'm trying to write Neural Style in MXNet.jl, and I keep running out of memory when I try to make new executors (and delete the old ones). My basic strategy is to store the executor in an exec variable and do
exec = 0
gc()
when I want to reclaim GPU memory for that executor. This does not work as expected, as I am tracking CUDA memory usage with nvidia-smi and there is never a drop in memory usage after calling gc().
Does anyone know of a way to reclaim GPU memory? Here is my code for reference: https://github.com/bonsairobo/mxnet-neural-style/blob/master/stylenet.jl
- Dominant language
- No language data
- Stars
- 369
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dmlc/MXNet.jl
-
Import fail MXNET.jlOpen
Difficulty 3/5 1-2 days Newbie friendliness 28/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
bot-triaged module: LrScheduler module: optimizer triaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
huggingface/peft#3999 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aws/sagemaker-python-sdk#6495 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
area/tracking bug triage: reproduced
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
mlflow/mlflow#26809 · 1 comment ·
Maintainers usually reply within 1 day