This commit is contained in:
Wing Lian
2025-02-13 16:01:01 -05:00
committed by GitHub
parent fdbb1a207c
commit ffae8d6a95
28 changed files with 900 additions and 183 deletions

View File

@@ -78,6 +78,24 @@ def require_torch_lt_2_6_0(test_case):
return unittest.skipUnless(is_max_2_6_0(), "test requires torch<2.6.0")(test_case)
def require_vllm(test_case):
"""
Decorator marking a test that requires a vllm to be installed
"""
def is_vllm_installed():
try:
import vllm # pylint: disable=unused-import # noqa: F401
return True
except ImportError:
return False
return unittest.skipUnless(
is_vllm_installed(), "test requires a vllm to be installed"
)(test_case)
def is_hopper():
compute_capability = torch.cuda.get_device_capability()
return compute_capability == (9, 0)