@@ -192,7 +192,7 @@ def generate_expected_address_lookup_buffer(
192
192
193
193
# pyre-ignore[56]: Pyre was not able to infer the type of argument
194
194
@unittest .skipIf (
195
- torch .cuda .device_count () <= 1 ,
195
+ torch .cuda .device_count () < 1 ,
196
196
"Not enough GPUs, this test requires at least two GPUs" ,
197
197
)
198
198
def test_init_itep_module (self ) -> None :
@@ -245,7 +245,7 @@ def test_init_itep_module_without_pruned_table(self) -> None:
245
245
246
246
# pyre-ignore[56]: Pyre was not able to infer the type of argument
247
247
@unittest .skipIf (
248
- torch .cuda .device_count () <= 1 ,
248
+ torch .cuda .device_count () < 1 ,
249
249
"Not enough GPUs, this test requires at least one GPU" ,
250
250
)
251
251
def test_train_forward (self ) -> None :
@@ -270,7 +270,7 @@ def test_train_forward(self) -> None:
270
270
271
271
# pyre-ignore[56]: Pyre was not able to infer the type of argument
272
272
@unittest .skipIf (
273
- torch .cuda .device_count () <= 1 ,
273
+ torch .cuda .device_count () < 1 ,
274
274
"Not enough GPUs, this test requires at least one GPU" ,
275
275
)
276
276
def test_train_forward_vbe (self ) -> None :
@@ -295,7 +295,7 @@ def test_train_forward_vbe(self) -> None:
295
295
296
296
# pyre-ignore[56]: Pyre was not able to infer the type of argument
297
297
@unittest .skipIf (
298
- torch .cuda .device_count () <= 1 ,
298
+ torch .cuda .device_count () < 1 ,
299
299
"Not enough GPUs, this test requires at least one GPU" ,
300
300
)
301
301
# Mock out reset_weight_momentum to count calls
@@ -329,7 +329,7 @@ def test_check_pruning_schedule(
329
329
330
330
# pyre-ignore[56]: Pyre was not able to infer the type of argument
331
331
@unittest .skipIf (
332
- torch .cuda .device_count () <= 1 ,
332
+ torch .cuda .device_count () < 1 ,
333
333
"Not enough GPUs, this test requires at least one GPU" ,
334
334
)
335
335
# Mock out reset_weight_momentum to count calls
@@ -365,7 +365,7 @@ def test_eval_forward(
365
365
366
366
# pyre-ignore[56]: Pyre was not able to infer the type of argument
367
367
@unittest .skipIf (
368
- torch .cuda .device_count () <= 1 ,
368
+ torch .cuda .device_count () < 1 ,
369
369
"Not enough GPUs, this test requires at least two GPUs" ,
370
370
)
371
371
def test_iter_increment_per_forward (self ) -> None :
@@ -397,7 +397,7 @@ def test_iter_increment_per_forward(self) -> None:
397
397
398
398
# pyre-ignore[56]: Pyre was not able to infer the type of argument
399
399
@unittest .skipIf (
400
- torch .cuda .device_count () <= 1 ,
400
+ torch .cuda .device_count () < 1 ,
401
401
"Not enough GPUs, this test requires at least one GPU" ,
402
402
)
403
403
def test_iter_passed_as_int_to_itep_module (self ) -> None :
@@ -440,7 +440,7 @@ def mock_forward(features: KeyedJaggedTensor, iter_val: int) -> List[Tensor]:
440
440
441
441
# pyre-ignore[56]: Pyre was not able to infer the type of argument
442
442
@unittest .skipIf (
443
- torch .cuda .device_count () <= 1 ,
443
+ torch .cuda .device_count () < 1 ,
444
444
"Not enough GPUs, this test requires at least one GPU" ,
445
445
)
446
446
def test_blank_line_formatting_preserved (self ) -> None :
@@ -472,7 +472,7 @@ def test_blank_line_formatting_preserved(self) -> None:
472
472
473
473
# pyre-ignore[56]: Pyre was not able to infer the type of argument
474
474
@unittest .skipIf (
475
- torch .cuda .device_count () <= 1 ,
475
+ torch .cuda .device_count () < 1 ,
476
476
"Not enough GPUs, this test requires at least one GPU" ,
477
477
)
478
478
def test_iter_boundary_values_with_pruning_logic (self ) -> None :
@@ -523,7 +523,7 @@ def mock_forward(
523
523
torch .cuda .device_count () <= 1 ,
524
524
"Not enough GPUs, this test requires at least one GPU" ,
525
525
)
526
- def test_error_handling_invalid_iter_tensor_values (self ) -> None :
526
+ def test_error_handling_invalid_iter_tensor_values_cuda (self ) -> None :
527
527
"""Test behavior with invalid iter tensor values."""
528
528
itep_module = GenericITEPModule (
529
529
table_name_to_unpruned_hash_sizes = self ._table_name_to_unpruned_hash_sizes ,
@@ -567,7 +567,7 @@ def test_error_handling_invalid_iter_tensor_values(self) -> None:
567
567
568
568
# pyre-ignore[56]: Pyre was not able to infer the type of argument
569
569
@unittest .skipIf (
570
- torch .cuda .device_count () <= 1 ,
570
+ torch .cuda .device_count () < 1 ,
571
571
"Not enough GPUs, this test requires at least one GPU" ,
572
572
)
573
573
def test_iter_consistency_across_training_steps (self ) -> None :
@@ -626,7 +626,7 @@ def track_iter_forward(
626
626
627
627
# pyre-ignore[56]: Pyre was not able to infer the type of argument
628
628
@unittest .skipIf (
629
- torch .cuda .device_count () <= 1 ,
629
+ torch .cuda .device_count () < 1 ,
630
630
"Not enough GPUs, this test requires at least one GPU" ,
631
631
)
632
632
def test_performance_iter_conversion_overhead (self ) -> None :
@@ -680,7 +680,7 @@ def test_performance_iter_conversion_overhead(self) -> None:
680
680
681
681
# pyre-ignore[56]: Pyre was not able to infer the type of argument
682
682
@unittest .skipIf (
683
- torch .cuda .device_count () <= 1 ,
683
+ torch .cuda .device_count () < 1 ,
684
684
"Not enough GPUs, this test requires at least one GPU" ,
685
685
)
686
686
def test_iter_type_conversion_edge_cases (self ) -> None :
@@ -744,7 +744,7 @@ def capture_iter_forward(
744
744
745
745
# pyre-ignore[56]: Pyre was not able to infer the type of argument
746
746
@unittest .skipIf (
747
- torch .cuda .device_count () <= 1 ,
747
+ torch .cuda .device_count () < 1 ,
748
748
"Not enough GPUs, this test requires at least one GPU" ,
749
749
)
750
750
def test_concurrent_forward_passes_iter_safety (self ) -> None :
0 commit comments