Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
f3aca1ee
Unverified
Commit
f3aca1ee
authored
Apr 01, 2025
by
Yang Chen
Committed by
GitHub
Apr 01, 2025
Browse files
setup correct nvcc version with CUDA_HOME (#15725)
Signed-off-by:
Yang Chen
<
yangche@fb.com
>
parent
8dd41d6b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
setup.py
setup.py
+5
-3
No files found.
setup.py
View file @
f3aca1ee
...
...
@@ -201,6 +201,9 @@ class cmake_build_ext(build_ext):
else
:
# Default build tool to whatever cmake picks.
build_tool
=
[]
# Make sure we use the nvcc from CUDA_HOME
if
_is_cuda
():
cmake_args
+=
[
f
'-DCMAKE_CUDA_COMPILER=
{
CUDA_HOME
}
/bin/nvcc'
]
subprocess
.
check_call
(
[
'cmake'
,
ext
.
cmake_lists_dir
,
*
build_tool
,
*
cmake_args
],
cwd
=
self
.
build_temp
)
...
...
@@ -639,11 +642,10 @@ if _is_hip():
if
_is_cuda
():
ext_modules
.
append
(
CMakeExtension
(
name
=
"vllm.vllm_flash_attn._vllm_fa2_C"
))
if
envs
.
VLLM_USE_PRECOMPILED
or
get_nvcc_cuda_version
()
>=
Version
(
"12.
0
"
):
# FA3 requires CUDA 12.
0
or later
if
envs
.
VLLM_USE_PRECOMPILED
or
get_nvcc_cuda_version
()
>=
Version
(
"12.
3
"
):
# FA3 requires CUDA 12.
3
or later
ext_modules
.
append
(
CMakeExtension
(
name
=
"vllm.vllm_flash_attn._vllm_fa3_C"
))
if
envs
.
VLLM_USE_PRECOMPILED
or
get_nvcc_cuda_version
()
>=
Version
(
"12.3"
):
# Optional since this doesn't get built (produce an .so file) when
# not targeting a hopper system
ext_modules
.
append
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment