Repository navigation
Use lld linker libcuvs conda - #2990
Draft
robertmaynard wants to merge 2 commits into
Draft
robertmaynard wants to merge 2 commits into
robertmaynard wants to merge 2 commits into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Add a `build-for-packaging` CMake preset (Release build, all supported GPU architectures, lld linker) and use it for the libcuvs conda build via build.sh's --cmake-args. Only the libcuvs recipe changes; the cuvs and cuvs-bench recipes and the wheel builds are unchanged. build.sh passes CMAKE_BUILD_TYPE and CMAKE_CUDA_ARCHITECTURES as -D flags ahead of --cmake-args. Command-line -D values take precedence over a preset's cache variables, so --gpu-arch and a non-Release build type still apply when the preset is selected; the setting the preset adds in the build.sh path is the linker. Measured link times, default GNU ld vs lld 23.1.4 (CUDA 13.3, conda GCC 13.3, CMAKE_CUDA_ARCHITECTURES=RAPIDS as with build.sh --allgpuarch, 64 cores, idle machine, median of 5 interleaved runs of the link commands taken from `ninja -t commands`): libcuvs.so (274 MB) 3.88 s -> 0.56 s (6.9x faster) libcuvs_c.so (3.6 MB) 0.21 s -> 0.06 s (3.8x faster) A single-architecture (sm_75) build shows the same: libcuvs.so goes from 3.68 s to 0.48 s (7.7x). Trade-offs and limits of the measurement: - This saves about 3.3 s per libcuvs.so link, against an all-arch compile of roughly 85 minutes. Link time barely grows with the number of GPU architectures because the extra size is embedded device code. - The lld-linked libcuvs.so is about 7 MB larger (the unloaded .strtab symbol-name table) and its peak RSS is higher (723 MB -> 976 MB). - The tests and bench-ann executables the recipe also links were not measured.
Developers who build with build.sh can now select the build-for-packaging preset (--cmake-args="--preset=build-for-packaging") without installing lld separately. Regenerate the conda environment files.
robertmaynard
force-pushed
the
use-lld-linker-libcuvs-conda
branch
from
November 2, 2026 21:34
2c4e9ba to
ca09b09
Compare
Contributor
Author
|
/okay to test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link libcuvs conda package with lld
Add a
build-for-packagingCMake preset (Release build, all supported GPUarchitectures, lld linker) and use it for the libcuvs conda build via
build.sh's --cmake-args. Only the libcuvs recipe changes; the cuvs and
cuvs-bench recipes and the wheel builds are unchanged.
build.sh passes CMAKE_BUILD_TYPE and CMAKE_CUDA_ARCHITECTURES as -D flags
ahead of --cmake-args. Command-line -D values take precedence over a
preset's cache variables, so --gpu-arch and a non-Release build type still
apply when the preset is selected; the setting the preset adds in the
build.sh path is the linker.
Measured link times, default GNU ld vs lld 23.1.4 (CUDA 13.3, conda GCC
13.3, CMAKE_CUDA_ARCHITECTURES=RAPIDS as with build.sh --allgpuarch, 64
cores, idle machine, median of 5 interleaved runs of the link commands
taken from
ninja -t commands):libcuvs.so (274 MB) 3.88 s -> 0.56 s (6.9x faster)
libcuvs_c.so (3.6 MB) 0.21 s -> 0.06 s (3.8x faster)