[CUDA] Add serialTest decorator to largeTensorTest in test_cuda.py (#159271)

Hopefully helps with disabled tests due to OOM such as https://github.com/pytorch/pytorch/issues/159069

Pull Request resolved: https://github.com/pytorch/pytorch/pull/159271
Approved by: https://github.com/Skylion007, https://github.com/ngimel
This commit is contained in:
eqy
2025-07-31 16:27:16 +00:00
committed by PyTorch MergeBot
parent f946b25865
commit 05aade1b6d

View File

@ -1503,6 +1503,7 @@ except RuntimeError as e:
)
@largeTensorTest("20GB", "cuda")
@serialTest()
def test_randint_generation_for_large_numel(self) -> None:
numel = 2**31 + 1
s = torch.randint(2, (numel,), device="cuda", dtype=torch.int8).sum()