From 9402788b34fbc6581ae9d7d9d68612a96d9aa111 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Tue, 7 Mar 2023 14:23:36 +0100 Subject: [PATCH] Skip `test_multi_gpu_data_parallel_forward` for some model tests (#21991) skip test_multi_gpu_data_parallel_forward for some model tests Co-authored-by: ydshieh --- .../conditional_detr/test_modeling_conditional_detr.py | 5 +++++ tests/models/detr/test_modeling_detr.py | 5 +++++ tests/models/swin/test_modeling_swin.py | 5 +++++ tests/models/swin2sr/test_modeling_swin2sr.py | 5 +++++ tests/models/swinv2/test_modeling_swinv2.py | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/tests/models/conditional_detr/test_modeling_conditional_detr.py b/tests/models/conditional_detr/test_modeling_conditional_detr.py index 8d62470fa3..11a548df92 100644 --- a/tests/models/conditional_detr/test_modeling_conditional_detr.py +++ b/tests/models/conditional_detr/test_modeling_conditional_detr.py @@ -247,6 +247,11 @@ class ConditionalDetrModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeline config_and_inputs = self.model_tester.prepare_config_and_inputs() self.model_tester.create_and_check_no_timm_backbone(*config_and_inputs) + # TODO: check if this works again for PyTorch 2.x.y + @unittest.skip(reason="Got `CUDA error: misaligned address` with PyTorch 2.0.0.") + def test_multi_gpu_data_parallel_forward(self): + pass + @unittest.skip(reason="Conditional DETR does not use inputs_embeds") def test_inputs_embeds(self): pass diff --git a/tests/models/detr/test_modeling_detr.py b/tests/models/detr/test_modeling_detr.py index c8f782e593..6c7c512cc8 100644 --- a/tests/models/detr/test_modeling_detr.py +++ b/tests/models/detr/test_modeling_detr.py @@ -246,6 +246,11 @@ class DetrModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixin config_and_inputs = self.model_tester.prepare_config_and_inputs() self.model_tester.create_and_check_no_timm_backbone(*config_and_inputs) + # TODO: check if this works again for PyTorch 2.x.y + @unittest.skip(reason="Got `CUDA error: misaligned address` with PyTorch 2.0.0.") + def test_multi_gpu_data_parallel_forward(self): + pass + @unittest.skip(reason="DETR does not use inputs_embeds") def test_inputs_embeds(self): pass diff --git a/tests/models/swin/test_modeling_swin.py b/tests/models/swin/test_modeling_swin.py index 6996e77260..804bffd31f 100644 --- a/tests/models/swin/test_modeling_swin.py +++ b/tests/models/swin/test_modeling_swin.py @@ -261,6 +261,11 @@ class SwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase): config_and_inputs = self.model_tester.prepare_config_and_inputs() self.model_tester.create_and_check_model(*config_and_inputs) + # TODO: check if this works again for PyTorch 2.x.y + @unittest.skip(reason="Got `CUDA error: misaligned address` with PyTorch 2.0.0.") + def test_multi_gpu_data_parallel_forward(self): + pass + @unittest.skipIf(is_torch_less_than_1_9, reason="This test fails for SwinModel when torch < 1.9") def test_training_gradient_checkpointing(self): super().test_training_gradient_checkpointing() diff --git a/tests/models/swin2sr/test_modeling_swin2sr.py b/tests/models/swin2sr/test_modeling_swin2sr.py index 50d776e6bb..2a142fc3b0 100644 --- a/tests/models/swin2sr/test_modeling_swin2sr.py +++ b/tests/models/swin2sr/test_modeling_swin2sr.py @@ -186,6 +186,11 @@ class Swin2SRModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase) config_and_inputs = self.model_tester.prepare_config_and_inputs() self.model_tester.create_and_check_for_image_super_resolution(*config_and_inputs) + # TODO: check if this works again for PyTorch 2.x.y + @unittest.skip(reason="Got `CUDA error: misaligned address` with PyTorch 2.0.0.") + def test_multi_gpu_data_parallel_forward(self): + pass + @unittest.skip(reason="Swin2SR does not use inputs_embeds") def test_inputs_embeds(self): pass diff --git a/tests/models/swinv2/test_modeling_swinv2.py b/tests/models/swinv2/test_modeling_swinv2.py index bda4b0f901..b0ceaff2ed 100644 --- a/tests/models/swinv2/test_modeling_swinv2.py +++ b/tests/models/swinv2/test_modeling_swinv2.py @@ -202,6 +202,11 @@ class Swinv2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase): config_and_inputs = self.model_tester.prepare_config_and_inputs() self.model_tester.create_and_check_model(*config_and_inputs) + # TODO: check if this works again for PyTorch 2.x.y + @unittest.skip(reason="Got `CUDA error: misaligned address` with PyTorch 2.0.0.") + def test_multi_gpu_data_parallel_forward(self): + pass + @unittest.skip(reason="Swinv2 does not use inputs_embeds") def test_inputs_embeds(self): pass