Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
vmoens committed Jan 7, 2025
1 parent 0159859 commit 967fb25
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tensordict/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1373,8 +1373,6 @@ def _parse_to(*args, **kwargs):
*args, **kwargs
)
else:
device = None
dtype = None
non_blocking = kwargs.get("non_blocking", False)
convert_to_format = kwargs.get("convert_to_format")
if len(args) > 0:
Expand All @@ -1390,7 +1388,7 @@ def _parse_to(*args, **kwargs):
device = torch.device(device)

if device and device.type == "cuda" and device.index is None:
device = torch.device("cuda:0")
device = torch.device(f"cuda:{torch.cuda.current_device()}")

if other is not None:
if device is not None and device != other.device:
Expand Down

0 comments on commit 967fb25

Please sign in to comment.