Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions vllm/platforms/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""

import os
from functools import lru_cache, wraps
from functools import wraps
from typing import (TYPE_CHECKING, Callable, List, Optional, Tuple, TypeVar,
Union)

Expand Down Expand Up @@ -284,7 +284,6 @@ def get_device_communicator_cls(cls) -> str:
class NvmlCudaPlatform(CudaPlatformBase):

@classmethod
@lru_cache(maxsize=8)
@with_nvml_context
def get_device_capability(cls,
device_id: int = 0
Expand All @@ -298,7 +297,6 @@ def get_device_capability(cls,
return None

@classmethod
@lru_cache(maxsize=8)
@with_nvml_context
def has_device_capability(
cls,
Expand All @@ -311,22 +309,19 @@ def has_device_capability(
return False

@classmethod
@lru_cache(maxsize=8)
@with_nvml_context
def get_device_name(cls, device_id: int = 0) -> str:
physical_device_id = device_id_to_physical_device_id(device_id)
return cls._get_physical_device_name(physical_device_id)

@classmethod
@lru_cache(maxsize=8)
@with_nvml_context
def get_device_uuid(cls, device_id: int = 0) -> str:
physical_device_id = device_id_to_physical_device_id(device_id)
handle = pynvml.nvmlDeviceGetHandleByIndex(physical_device_id)
return pynvml.nvmlDeviceGetUUID(handle)

@classmethod
@lru_cache(maxsize=8)
@with_nvml_context
def get_device_total_memory(cls, device_id: int = 0) -> int:
physical_device_id = device_id_to_physical_device_id(device_id)
Expand Down