Skip to content

Commit 7fbb98e

Browse files
mickaelseznecLucasWilkinson
authored andcommitted
fix: pre-commit
Signed-off-by: Mickael Seznec <[email protected]>
1 parent 2d094c6 commit 7fbb98e

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ def configure(self, ext: CMakeExtension) -> None:
187187
# 12.6 is known to segfault when compiling flash attention,
188188
# instead, hack toolchain to use ptxas from 12.8
189189
# https://github.com/Dao-AILab/flash-attention/blob/main/hopper/setup.py#L404
190-
override_files = utils.maybe_patch_compiler(get_nvcc_cuda_version() if _is_cuda() else None)
190+
override_files = utils.maybe_patch_compiler(
191+
get_nvcc_cuda_version() if _is_cuda() else None)
191192

192193
with utils.OverrideFiles(override_files):
193194
subprocess.check_call(

vllm/setup_utils.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3+
import os
4+
import platform
5+
import tarfile
16
from pathlib import Path
27
from shutil import copy, copytree, which
38
from tempfile import TemporaryDirectory
4-
import tarfile
59
from typing import Optional
610

711
from packaging.version import Version
@@ -81,7 +85,8 @@ def download_toolchain(nvcc_version: str, ptxas_version: str, dst_path: Path):
8185
)
8286

8387

84-
def maybe_patch_compiler(cuda_version: Optional[Version] = None) -> dict[Path, Path]:
88+
def maybe_patch_compiler(
89+
cuda_version: Optional[Version] = None) -> dict[Path, Path]:
8590
if cuda_version is None or cuda_version != Version("12.6"):
8691
return {}
8792
assert CUDA_HOME is not None, "CUDA_HOME is not set"
@@ -110,5 +115,3 @@ def __exit__(self, exc_type, exc_value, traceback):
110115
for target in self.override_map:
111116
target.unlink()
112117
target.with_suffix('.backup').rename(target)
113-
114-

0 commit comments

Comments
 (0)