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

Proper gpu in tutorials #1558

Merged
merged 3 commits into from
Jan 13, 2023
Merged

Proper gpu in tutorials #1558

merged 3 commits into from
Jan 13, 2023

Conversation

adam-narozniak
Copy link
Member

@adam-narozniak adam-narozniak commented Jan 11, 2023

Support GPU out-of-the-box GPU in simulations(when a user specifies "cuda" as the device) in the following tutorials:

  • An Introduction to Federated Learning
  • Strategies in Federated Learning
  • Building a Strategy
  • Client and NumPyClient

How:
Specify GPU in start_simulation, by giving client_resources argument with {num_gpus=1}, in case of using CUDA

Other changes:
Also adds .to(DEVICE) when it was missing (2nd tutorial)

Also adds .to(DEVICE) when it was missing
@adam-narozniak adam-narozniak marked this pull request as ready for review January 12, 2023 13:47
@danieljanes danieljanes enabled auto-merge (squash) January 13, 2023 02:15
@danieljanes danieljanes merged commit 685ce14 into main Jan 13, 2023
@danieljanes danieljanes deleted the proper-gpu-in-tutorials branch January 13, 2023 02:25
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