|
19 | 19 |
|
20 | 20 | import psutil
|
21 | 21 | import torch
|
22 |
| -from packaging.version import Version, parse |
23 | 22 |
|
24 | 23 | import vllm.envs as envs
|
25 | 24 | from vllm.logger import enable_trace_function_call, init_logger
|
@@ -314,27 +313,6 @@ def cdiv(a: int, b: int) -> int:
|
314 | 313 | return -(a // -b)
|
315 | 314 |
|
316 | 315 |
|
317 |
| -@lru_cache(maxsize=None) |
318 |
| -def get_nvcc_cuda_version() -> Optional[Version]: |
319 |
| - cuda_home = envs.CUDA_HOME |
320 |
| - if not cuda_home: |
321 |
| - cuda_home = '/usr/local/cuda' |
322 |
| - if os.path.isfile(cuda_home + '/bin/nvcc'): |
323 |
| - logger.info( |
324 |
| - 'CUDA_HOME is not found in the environment. ' |
325 |
| - 'Using %s as CUDA_HOME.', cuda_home) |
326 |
| - else: |
327 |
| - logger.warning('Not found nvcc in %s. Skip cuda version check!', |
328 |
| - cuda_home) |
329 |
| - return None |
330 |
| - nvcc_output = subprocess.check_output([cuda_home + "/bin/nvcc", "-V"], |
331 |
| - universal_newlines=True) |
332 |
| - output = nvcc_output.split() |
333 |
| - release_idx = output.index("release") + 1 |
334 |
| - nvcc_cuda_version = parse(output[release_idx].split(",")[0]) |
335 |
| - return nvcc_cuda_version |
336 |
| - |
337 |
| - |
338 | 316 | def _generate_random_fp8(
|
339 | 317 | tensor: torch.tensor,
|
340 | 318 | low: float,
|
@@ -560,7 +538,7 @@ def maybe_expand_dim(tensor: torch.Tensor,
|
560 | 538 | def merge_dicts(dict1: Dict[Any, List[Any]],
|
561 | 539 | dict2: Dict[Any, List[Any]]) -> Dict[Any, List[Any]]:
|
562 | 540 | """Merge 2 dicts that have key -> List of items.
|
563 |
| - |
| 541 | +
|
564 | 542 | When a key conflicts, the values in dict1 is prioritized.
|
565 | 543 | """
|
566 | 544 | merged_dict = defaultdict(list)
|
|
0 commit comments