[BE][2/6] fix typos in test/ (test/test_*.py) (#157636)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/157636
Approved by: https://github.com/yewentao256, https://github.com/mlazos
ghstack dependencies: #156311, #156609
This commit is contained in:
Xuehai Pan
2025-07-09 13:23:55 +08:00
committed by PyTorch MergeBot
parent ffe11b2bf2
commit fc0376e8b1
57 changed files with 194 additions and 195 deletions

View File

@ -967,7 +967,7 @@ class TestCudaMultiGPU(TestCase):
@unittest.skipIf(not TEST_MULTIGPU, "only one GPU detected")
def test_caching_pinned_memory_multi_gpu(self):
# checks that the events preventing pinned memory from being re-used
# checks that the events preventing pinned memory from being reused
# too early are recorded on the correct GPU
cycles_per_ms = get_cycles_per_ms()
@ -982,7 +982,7 @@ class TestCudaMultiGPU(TestCase):
del t
t = torch.FloatTensor([2]).pin_memory()
self.assertNotEqual(t.data_ptr(), ptr, msg="allocation re-used too soon")
self.assertNotEqual(t.data_ptr(), ptr, msg="allocation reused too soon")
with torch.cuda.device(0):
gpu_tensor0.copy_(t, non_blocking=True)