Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Oct 10, 2023
1 parent 85f596d commit fb5c470
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tensordict/memmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,6 @@ def _where(condition, input, other):
input = input.to("cpu").to(device, non_blocking=True)
else:
input = input.as_tensor()
if condition.device != device or (isinstance(other, (MemmapTensor, torch.Tensor)) and other.device != device):
raise ValueError(f"{condition.device}, {device}, {other.device}")
return torch.where(condition=condition, input=input, other=other)


Expand Down

0 comments on commit fb5c470

Please sign in to comment.