[Platform] Add is_cumem_allocator_available (#43838)
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
27a93cd426
commit
02a01496fc
@@ -199,6 +199,14 @@ class Platform:
|
||||
# all ROCm platforms for now.
|
||||
return self._enum in (PlatformEnum.CUDA, PlatformEnum.ROCM)
|
||||
|
||||
def is_cumem_allocator_available(self) -> bool:
|
||||
try:
|
||||
from vllm.device_allocator.cumem import cumem_available
|
||||
except ImportError:
|
||||
return False
|
||||
|
||||
return cumem_available
|
||||
|
||||
@classmethod
|
||||
def get_pass_manager_cls(cls) -> str:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user