Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ def skip_test_p(name: str) -> bool:
'functorch/test_vmap', # OOM
'test_fx', # gets SIGKILL
'test_dataloader', # frequently hangs for ROCm
'test_serialization', # test_serialization_2gb_file allocates a tensor of 2GB, and could cause OOM
]

# A subset of our TEST list that validates PyTorch's ops, modules, and autograd function as expected
Expand Down
3 changes: 3 additions & 0 deletions test/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import io
import tempfile
import os
import gc
import sys
import zipfile
import warnings
Expand Down Expand Up @@ -905,6 +906,8 @@ def test_serialization_zipfile_actually_jit(self):

# Ensure large zip64 serialization works properly
def test_serialization_2gb_file(self):
# Run GC to clear up as much memory as possible before running this test
gc.collect()
big_model = torch.nn.Conv2d(20000, 3200, kernel_size=3)

with BytesIOContext() as f:
Expand Down