disable ray tests for latest torch release (#2328)

* disable ray tests for latest torch release

* move decorator from class to method
This commit is contained in:
Wing Lian
2025-02-12 18:29:02 -05:00
committed by GitHub
parent e37a4a536a
commit 30046315d9
2 changed files with 15 additions and 1 deletions

View File

@@ -66,6 +66,18 @@ def require_torch_2_5_1(test_case):
return unittest.skipUnless(is_min_2_5_1(), "test requires torch>=2.5.1")(test_case)
def require_torch_lt_2_6_0(test_case):
"""
Decorator marking a test that requires torch >= 2.5.1
"""
def is_max_2_6_0():
torch_version = version.parse(torch.__version__)
return torch_version < version.parse("2.6.0")
return unittest.skipUnless(is_max_2_6_0(), "test requires torch<2.6.0")(test_case)
def is_hopper():
compute_capability = torch.cuda.get_device_capability()
return compute_capability == (9, 0)