You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dataloader accumulates GPU memory across batches if not manually calling gc.collect() after each batch or after every e.g every 5th batch. See example below, manually calling garbage collection saves around 7GiB in max GPU memory usage (11GiB vs 18GiB). Is there a way to free up GPU memory more reliable after each batch?
How does calling loader.stop() help with the memory consumption during training (while the loader gets consumed)? The problem isn't that the memory doesn't get properly released at the end of the training but rather during training.
@felix0097 thanks for reporting that. we are not looking into that issue right now, due to some other tasks. So does manually calling garbage collection helps you?
Describe the issue:
Dataloader accumulates GPU memory across batches if not manually calling
gc.collect()
after each batch or after every e.g every 5th batch. See example below, manually calling garbage collection saves around7GiB
in max GPU memory usage (11GiB
vs18GiB
). Is there a way to free up GPU memory more reliable after each batch?Minimal Complete Verifiable Example:
Create example data:
Check memory usage:
Without manually calling garbage collection
With manually calling garbage collection
Environment:
OS: Rocky Linux 8.7
Python: 3.10.9
merlin-core: 0.10.0
merlin-dataloader: 0.0.4
cudf-cu11: 23.02
rmm-cu11: 23.02
dask-cudf: 23.02
I installed both cudf + merlin via pip:
python -m pip install cudf-cu11==23.02 rmm-cu11==23.02 dask-cudf-cu11==23.02 --extra-index-url https://pypi.nvidia.com/
python -m pip install merlin-dataloader
The text was updated successfully, but these errors were encountered: