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

Fix CUDA variable serialization #3253

Merged
merged 3 commits into from Mar 12, 2021
Merged

Conversation

mszhanyi
Copy link
Contributor

Fix #2899

  1. Pickle doesn't support cuda variables, so it throws Unpickable exception when using dataloader with multiple workers if the process start method is spawn.
  2. So when the process method is spawn, we move data to cuda in learner one_batch.

@mszhanyi mszhanyi requested a review from jph00 as a code owner March 10, 2021 14:39
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@mszhanyi
Copy link
Contributor Author

mszhanyi commented Mar 10, 2021

@jph00 , Could you please take a look when you're free.

@mszhanyi mszhanyi changed the title fix issue 2899 fix issue 2899 Cannot pickle CUDA storage Mar 10, 2021
@jph00
Copy link
Member

jph00 commented Mar 12, 2021

Great job! :D

@jph00 jph00 merged commit e4303fb into fastai:master Mar 12, 2021
@hamelsmu hamelsmu changed the title fix issue 2899 Cannot pickle CUDA storage Fix CUDA variable serialization May 1, 2021
@hamelsmu hamelsmu added the bug label May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants