43
43
scoped_load_inline ,
44
44
skipIfWindows ,
45
45
)
46
- from torch .testing ._internal .distributed .fake_pg import FakeStore
47
46
from torch .testing ._internal .hop_db import hop_db
48
47
from torch .testing ._internal .inductor_utils import GPU_TYPE , HAS_CPU , HAS_CUDA , HAS_GPU
49
48
from torch .testing ._internal .logging_utils import logs_to_string
@@ -4164,7 +4163,13 @@ def aot_eager():
4164
4163
first , second , third , fourth = fn (eager (), aot_eager ())
4165
4164
self .assertIsNone (third )
4166
4165
4166
+ @unittest .skipIf (
4167
+ not torch .distributed .is_available (),
4168
+ "FakePG relies on distributed build" ,
4169
+ )
4167
4170
def test_ddp_cpp_reducer_error (self ):
4171
+ from torch .testing ._internal .distributed .fake_pg import FakeStore
4172
+
4168
4173
store = FakeStore ()
4169
4174
dist .init_process_group (backend = "fake" , rank = 0 , world_size = 2 , store = store )
4170
4175
try :
@@ -4184,8 +4189,14 @@ def test_ddp_cpp_reducer_error(self):
4184
4189
finally :
4185
4190
dist .destroy_process_group ()
4186
4191
4192
+ @unittest .skipIf (
4193
+ not torch .distributed .is_available (),
4194
+ "FakePG relies on distributed build" ,
4195
+ )
4187
4196
@config .patch (optimize_ddp = "python_reducer" )
4188
4197
def test_ddp_python_reducer (self ):
4198
+ from torch .testing ._internal .distributed .fake_pg import FakeStore
4199
+
4189
4200
store = FakeStore ()
4190
4201
dist .init_process_group (backend = "fake" , rank = 0 , world_size = 2 , store = store )
4191
4202
try :
@@ -4440,6 +4451,11 @@ def wrap_test_class(orig_cls):
4440
4451
"test_graph_save_on_cpu" , # torch.save should no-op and be recorded in the graph
4441
4452
"test_saving_variable_to_disk" , # torch.save should no-op and be recorded in the graph
4442
4453
"test_nested_checkpoint_early_stop_False" , # AOT backward higher order gradients
4454
+ # Slow tests, these tests are close to CI timeout if we try to torch.compile them
4455
+ "test_checkpointing" ,
4456
+ "test_checkpointing_without_reentrant_memory_savings" ,
4457
+ "test_checkpointing_without_reentrant_input_requires_grad_True" ,
4458
+ "test_checkpointing_without_reentrant_input_requires_grad_False" ,
4443
4459
},
4444
4460
"aot_eager" : { # will be run with torch.compile(backend="eager")
4445
4461
# Category: FakeTensor
0 commit comments