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

Allow cpu(::DataLoader) #2388

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Allow cpu(::DataLoader) #2388

merged 2 commits into from
Mar 5, 2024

Conversation

mcabbott
Copy link
Member

@mcabbott mcabbott commented Mar 2, 2024

We allow DataLoader(X) |> gpu as an idiom for moving each batch to the GPU. This allows for |> cpu to work too, for symmetry, and in case you want to pass device = cpu to something which does this.

PR Checklist

  • Tests are added
  • Entry in NEWS.md
  • Documentation, if applicable

Copy link

codecov bot commented Mar 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.16%. Comparing base (20d516b) to head (077a6cb).

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2388       +/-   ##
===========================================
+ Coverage   42.55%   74.16%   +31.61%     
===========================================
  Files          31       31               
  Lines        1786     1831       +45     
===========================================
+ Hits          760     1358      +598     
+ Misses       1026      473      -553     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mcabbott mcabbott merged commit da11bf2 into FluxML:master Mar 5, 2024
8 of 10 checks passed
@mcabbott mcabbott deleted the cpu_DataLoader branch March 5, 2024 20:38
isentropic pushed a commit to isentropic/Flux.jl that referenced this pull request Mar 13, 2024
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.

2 participants