Skip to content

Commit

Permalink
Revert "[Core] Cache some utils" (vllm-project#3507)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-mo authored Mar 19, 2024
1 parent 2a60c9b commit cc63d03
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions vllm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import subprocess
import uuid
import gc
from functools import cache
from platform import uname
from typing import List, Tuple, Union
from packaging.version import parse, Version
Expand Down Expand Up @@ -121,7 +120,6 @@ def is_hip() -> bool:
return torch.version.hip is not None


@cache
def is_neuron() -> bool:
try:
import transformers_neuronx
Expand All @@ -130,7 +128,6 @@ def is_neuron() -> bool:
return transformers_neuronx is not None


@cache
def get_max_shared_memory_bytes(gpu: int = 0) -> int:
"""Returns the maximum shared memory per thread block in bytes."""
# NOTE: This import statement should be executed lazily since
Expand All @@ -154,7 +151,6 @@ def random_uuid() -> str:
return str(uuid.uuid4().hex)


@cache
def in_wsl() -> bool:
# Reference: https://github.com/microsoft/WSL/issues/4071
return "microsoft" in " ".join(uname()).lower()
Expand Down Expand Up @@ -229,7 +225,6 @@ def set_cuda_visible_devices(device_ids: List[int]) -> None:
os.environ["CUDA_VISIBLE_DEVICES"] = ",".join(map(str, device_ids))


@cache
def get_nvcc_cuda_version() -> Optional[Version]:
cuda_home = os.environ.get('CUDA_HOME')
if not cuda_home:
Expand Down

0 comments on commit cc63d03

Please sign in to comment.