Skip to content

Commit

Permalink
Update module.py
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannivolpe committed May 24, 2024
1 parent c652850 commit fcd1806
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions deeplay/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,12 +949,6 @@ def predict(
for idx_0 in range(0, len(x), batch_size):
idx_1 = min(idx_0 + batch_size, len(x))
batch = [item[idx_0:idx_1] for item in [x, *args]]
for idx, x in enumerate(batch):
# if is on mps
if isinstance(x, torch.Tensor) and x.device.type == "mps":
# This is a fix to a torch MPS issue where indexed tensors
# will cause subRange crashes.
batch[idx] = torch.clone(x).float()

for i, item in enumerate(batch):
if not isinstance(item, torch.Tensor):
Expand Down

0 comments on commit fcd1806

Please sign in to comment.