mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Run test_serialization serially (for 2xlarge runners) (#94613)
Fixes https://github.com/pytorch/pytorch/issues/92746 Pull Request resolved: https://github.com/pytorch/pytorch/pull/94613 Approved by: https://github.com/clee2000
This commit is contained in:
@ -319,6 +319,7 @@ CI_SERIAL_LIST = [
|
||||
'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
|
||||
|
@ -5,6 +5,7 @@ import unittest
|
||||
import io
|
||||
import tempfile
|
||||
import os
|
||||
import gc
|
||||
import sys
|
||||
import zipfile
|
||||
import warnings
|
||||
@ -905,6 +906,8 @@ class TestSerialization(TestCase, SerializationMixin):
|
||||
|
||||
# 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:
|
||||
|
Reference in New Issue
Block a user