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
de9fb4be
Unverified
Commit
de9fb4be
authored
Oct 11, 2024
by
Lucas Wilkinson
Committed by
GitHub
Oct 11, 2024
Browse files
[Bugfix][CI/Build] Fix docker build where CUDA archs < 7.0 are being detected (#9254)
parent
8baf85e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
CMakeLists.txt
CMakeLists.txt
+20
-15
No files found.
CMakeLists.txt
View file @
de9fb4be
...
...
@@ -144,27 +144,32 @@ else()
endif
()
#
# For cuda we want to be able to control which architectures we compile for on
# a per-file basis in order to cut down on compile time. So here we extract
# the set of architectures we want to compile for and remove the from the
# CMAKE_CUDA_FLAGS so that they are not applied globally.
#
if
(
VLLM_GPU_LANG STREQUAL
"CUDA"
)
#
# For cuda we want to be able to control which architectures we compile for on
# a per-file basis in order to cut down on compile time. So here we extract
# the set of architectures we want to compile for and remove the from the
# CMAKE_CUDA_FLAGS so that they are not applied globally.
#
clear_cuda_arches
(
CUDA_ARCH_FLAGS
)
extract_unique_cuda_archs_ascending
(
CUDA_ARCHS
"
${
CUDA_ARCH_FLAGS
}
"
)
message
(
STATUS
"CUDA target architectures:
${
CUDA_ARCHS
}
"
)
# Filter the target architectures by the supported supported archs
# since for some files we will build for all CUDA_ARCHS.
cuda_archs_loose_intersection
(
CUDA_ARCHS
"
${
CUDA_SUPPORTED_ARCHS
}
"
"
${
CUDA_ARCHS
}
"
)
message
(
STATUS
"CUDA supported target architectures:
${
CUDA_ARCHS
}
"
)
else
()
#
# For other GPU targets override the GPU architectures detected by cmake/torch
# and filter them by the supported versions for the current language.
# The final set of arches is stored in `VLLM_GPU_ARCHES`.
#
override_gpu_arches
(
VLLM_GPU_ARCHES
${
VLLM_GPU_LANG
}
"
${${
VLLM_GPU_LANG
}
_SUPPORTED_ARCHS
}
"
)
endif
()
#
# Override the GPU architectures detected by cmake/torch and filter them by
# the supported versions for the current language.
# The final set of arches is stored in `VLLM_GPU_ARCHES`.
#
override_gpu_arches
(
VLLM_GPU_ARCHES
${
VLLM_GPU_LANG
}
"
${${
VLLM_GPU_LANG
}
_SUPPORTED_ARCHS
}
"
)
#
# Query torch for additional GPU compilation flags for the given
# `VLLM_GPU_LANG`.
...
...
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