Skip to content

Commit

Permalink
rank instead of local rank
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Oct 10, 2018
1 parent cc5afbe commit 6ceea4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/cifar100/main_horovod.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ def forward(self, x):
hvd.init()

print ("use cuda!!")
print ("local rank {}".format(hvd.local_rank()))
torch.cuda.set_device(hvd.local_rank())
print ("local rank {}, rank {}".format(hvd.local_rank(),hvd.rank()))
torch.cuda.set_device(hvd.rank())
torch.cuda.manual_seed(1111)

best_acc = 0
Expand Down

0 comments on commit 6ceea4c

Please sign in to comment.