Skip to content

Commit

Permalink
Fixing Multiple GPU example limited to one GPU
Browse files Browse the repository at this point in the history
Fixes #2563
Modifying data_parallel_tutorial.py, removed cuda:0 to enable using multiple GPUs.
  • Loading branch information
prithviraj-maurya authored Nov 4, 2023
1 parent e7563f6 commit c9f86f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beginner_source/blitz/data_parallel_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
######################################################################
# Device
#
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

######################################################################
# Dummy DataSet
Expand Down

0 comments on commit c9f86f6

Please sign in to comment.