Skip to content

Commit

Permalink
wording
Browse files Browse the repository at this point in the history
  • Loading branch information
qqaatw authored and pytorchmergebot committed Feb 27, 2023
1 parent a376fad commit 9a3d2fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_mps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2669,10 +2669,10 @@ def test_copy_non_contiguous(self):
def test_copy_storage_offset(self):
x_cpu = torch.zeros(5, device="cpu", dtype=torch.float32)
x_mps = torch.zeros(5, device="mps", dtype=torch.float32)
idx_cpu = torch.tensor([1, 1], device="cpu", dtype=torch.int64)
idx_mps = torch.tensor([1, 1], device="mps", dtype=torch.int64)
x_cpu[2:4] = idx_cpu
x_mps[2:4] = idx_mps # implicit type casting and copy
update_cpu = torch.tensor([1, 1], device="cpu", dtype=torch.int64)
update_mps = torch.tensor([1, 1], device="mps", dtype=torch.int64)
x_cpu[2:4] = update_cpu
x_mps[2:4] = update_mps # implicit type casting and copy
self.assertEqual(x_cpu, x_mps)

# See https://github.com/pytorch/pytorch/pull/84742
Expand Down

0 comments on commit 9a3d2fc

Please sign in to comment.