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
51c24c97
Unverified
Commit
51c24c97
authored
Oct 23, 2024
by
Luka Govedič
Committed by
GitHub
Oct 23, 2024
Browse files
[Build] Fix `FetchContent` multiple build issue (#9596)
Signed-off-by:
luka
<
luka@neuralmagic.com
>
parent
831540cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
CMakeLists.txt
CMakeLists.txt
+6
-4
setup.py
setup.py
+8
-0
No files found.
CMakeLists.txt
View file @
51c24c97
...
...
@@ -169,12 +169,12 @@ endif()
#
# Use FetchContent for C++ dependencies that are compiled as part of vLLM's build process.
# Configure it to place files in vllm/.deps, in order to play nicely with sccache.
# setup.py will override FETCHCONTENT_BASE_DIR to play nicely with sccache.
# Each dependency that produces build artifacts should override its BINARY_DIR to avoid
# conflicts between build types. It should instead be set to ${CMAKE_BINARY_DIR}/<dependency>.
#
include
(
FetchContent
)
get_filename_component
(
PROJECT_ROOT_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
ABSOLUTE
)
file
(
MAKE_DIRECTORY
"
${
FETCHCONTENT_BASE_DIR
}
"
)
set
(
FETCHCONTENT_BASE_DIR
"
${
PROJECT_ROOT_DIR
}
/.deps"
)
file
(
MAKE_DIRECTORY
${
FETCHCONTENT_BASE_DIR
}
)
# Ensure the directory exists
message
(
STATUS
"FetchContent base directory:
${
FETCHCONTENT_BASE_DIR
}
"
)
#
...
...
@@ -509,6 +509,8 @@ else()
GIT_REPOSITORY https://github.com/vllm-project/flash-attention.git
GIT_TAG 013f0c4fc47e6574060879d9734c1df8c5c273bd
GIT_PROGRESS TRUE
# Don't share the vllm-flash-attn build between build types
BINARY_DIR
${
CMAKE_BINARY_DIR
}
/vllm-flash-attn
)
endif
()
...
...
setup.py
View file @
51c24c97
...
...
@@ -157,6 +157,14 @@ class cmake_build_ext(build_ext):
# on subsequent calls to python.
cmake_args
+=
[
'-DVLLM_PYTHON_PATH={}'
.
format
(
":"
.
join
(
sys
.
path
))]
# Override the base directory for FetchContent downloads to $ROOT/.deps
# This allows sharing dependencies between profiles,
# and plays more nicely with sccache.
# To override this, set the FETCHCONTENT_BASE_DIR environment variable.
fc_base_dir
=
os
.
path
.
join
(
ROOT_DIR
,
".deps"
)
fc_base_dir
=
os
.
environ
.
get
(
"FETCHCONTENT_BASE_DIR"
,
fc_base_dir
)
cmake_args
+=
[
'-DFETCHCONTENT_BASE_DIR={}'
.
format
(
fc_base_dir
)]
#
# Setup parallelism and build tool
#
...
...
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