Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update multi-gpu notebook to set cupy device #675

Merged
merged 3 commits into from
Apr 18, 2023

Conversation

edknv
Copy link
Collaborator

@edknv edknv commented Apr 17, 2023

Depends on NVIDIA-Merlin/dataloader#135.

Goals ⚽

Update the multi-gpu training notebook to work with the new version of the Merlin dataloader.

Implementation Details 🚧

The new dataloader keeps the data in cupy arrays and converts each batch to torch tensors at the last minute, while the old dataloader converted everything to torch tensors as soon as the dataset was loaded from dask-cudf. Since we are using cupy in the dataloader now, we have to ensure that cupy uses the correct device by using cupy.cuda.Device. This should ideally be set in merlin.io.Dataset so users don't have to set this, but we add this to the notebook as a short-term workaround.

Testing Details 🔍

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions
Copy link

@edknv edknv requested review from rnyak and bbozkaya April 17, 2023 19:32
@edknv edknv self-assigned this Apr 17, 2023
@edknv edknv added this to the Merlin 23.04 milestone Apr 17, 2023
@edknv edknv marked this pull request as ready for review April 17, 2023 19:33
@edknv edknv added bug Something isn't working chore Maintenance for the repository labels Apr 17, 2023
@marcromeyn marcromeyn merged commit 61f67ab into NVIDIA-Merlin:main Apr 18, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/examples bug Something isn't working chore Maintenance for the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants