Skip to content
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

[pyspark] clear temp storage to release GPU memory before each iteration #10226

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wbo4958
Copy link
Contributor

@wbo4958 wbo4958 commented Apr 26, 2024

When setting the current data batch (already copied to GPU from CPU) to the DMatrixProxy, it still holds the previous data batch during building QDM, which will increase the peak GPU memory usage. So this PR tried to clear the temporary storage before each iteration.

I tested it on my local standalone cluster with 1 worker node with 12G GPU memory, XGBoost can train (4800000, 750) with this PR, while XGBoost can train only (4300000, 750) without this PR.

@trivialfis
Copy link
Member

Thank you for working on this. Is it possible to make this change universal instead of spark-only? The temporary data is a reference to transformed features like encoded categories or converted data types, it's to make sure they don't get garbage collected before the next iteration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants