From 9fd123ac31b8597c5004be7986547914d5302069 Mon Sep 17 00:00:00 2001 From: Dmitry Rogozhkin Date: Tue, 7 Jan 2025 01:16:34 -0800 Subject: [PATCH] ci: mark model_parallel tests as cuda specific (#35269) `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 --- tests/test_modeling_common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_modeling_common.py b/tests/test_modeling_common.py index 708a3a54e3..9bf3514730 100755 --- a/tests/test_modeling_common.py +++ b/tests/test_modeling_common.py @@ -3061,6 +3061,7 @@ class ModelTesterMixin: 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: @@ -3123,6 +3124,7 @@ class ModelTesterMixin: 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: