From 3020e04e80cceb14d36c833722337478585fe772 Mon Sep 17 00:00:00 2001 From: sayakpaul Date: Wed, 23 Jul 2025 18:52:33 +0530 Subject: [PATCH] enforce torch version in the compilation tests. --- tests/models/test_modeling_common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/models/test_modeling_common.py b/tests/models/test_modeling_common.py index 8309700ce106..435bd32c6083 100644 --- a/tests/models/test_modeling_common.py +++ b/tests/models/test_modeling_common.py @@ -1948,6 +1948,7 @@ def test_push_to_hub_library_name(self): @require_torch_2 @is_torch_compile @slow +@require_torch_version_greater("2.7.1") class TorchCompileTesterMixin: different_shapes_for_compilation = None @@ -2046,6 +2047,7 @@ def test_compile_on_different_shapes(self): @require_torch_accelerator @require_peft_backend @require_peft_version_greater("0.14.0") +@require_torch_version_greater("2.7.1") @is_torch_compile class LoraHotSwappingForModelTesterMixin: """Test that hotswapping does not result in recompilation on the model directly.