Skip to content

Commit

Permalink
fix type mismatch while call torch._C._cuda_setDevice (pytorch#8065)
Browse files Browse the repository at this point in the history
* fix type mismatch while call torch._C._cuda_setDevice

* fix type mismatch in scatter

* fix type mismatch in scatter

* fix type mismatch while call torch._C._cuda_setDevice

* fix type mismatch while call torch._C._cuda_setDevice

* fix type mismatch while call torch._C._cuda_setDevice
  • Loading branch information
HisiFish authored and soumith committed Jun 5, 2018
1 parent c446269 commit f5cd479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/cuda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class device(object):
"""

def __init__(self, idx):
self.idx = idx
self.idx = int(idx)
self.prev_idx = -1

def __enter__(self):
Expand Down

0 comments on commit f5cd479

Please sign in to comment.