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 <dmitry.v.rogozhkin@intel.com>
This commit is contained in:
Dmitry Rogozhkin
2025-01-07 01:16:34 -08:00
committed by GitHub
parent bd442c6d3a
commit 9fd123ac31

View File

@@ -3061,6 +3061,7 @@ class ModelTesterMixin:
with torch.no_grad(): with torch.no_grad():
_ = model(**self._prepare_for_class(inputs_dict, model_class)) _ = model(**self._prepare_for_class(inputs_dict, model_class))
@require_torch_gpu
@require_torch_multi_gpu @require_torch_multi_gpu
def test_model_parallelization(self): def test_model_parallelization(self):
if not self.test_model_parallel: if not self.test_model_parallel:
@@ -3123,6 +3124,7 @@ class ModelTesterMixin:
gc.collect() gc.collect()
torch.cuda.empty_cache() torch.cuda.empty_cache()
@require_torch_gpu
@require_torch_multi_gpu @require_torch_multi_gpu
def test_model_parallel_equal_results(self): def test_model_parallel_equal_results(self):
if not self.test_model_parallel: if not self.test_model_parallel: