Skip to content

Commit

Permalink
ci: mark model_parallel tests as cuda specific (#35269)
Browse files Browse the repository at this point in the history
`parallelize()` API is deprecated in favor of accelerate's `device_map="auto"`
and therefore is not accepting new features. At the same time `parallelize()`
implementation is currently CUDA-specific. This commit marks respective
ci tests with `@require_torch_gpu`.

Fixes: #35252

Signed-off-by: Dmitry Rogozhkin <[email protected]>
  • Loading branch information
dvrogozh authored Jan 7, 2025
1 parent bd442c6 commit 9fd123a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_modeling_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3061,6 +3061,7 @@ def test_multi_gpu_data_parallel_forward(self):
with torch.no_grad():
_ = model(**self._prepare_for_class(inputs_dict, model_class))

@require_torch_gpu
@require_torch_multi_gpu
def test_model_parallelization(self):
if not self.test_model_parallel:
Expand Down Expand Up @@ -3123,6 +3124,7 @@ def get_current_gpu_memory_use():
gc.collect()
torch.cuda.empty_cache()

@require_torch_gpu
@require_torch_multi_gpu
def test_model_parallel_equal_results(self):
if not self.test_model_parallel:
Expand Down

0 comments on commit 9fd123a

Please sign in to comment.