Repository navigation
Conversation
The CUDA language's default runtime link is static (CMAKE_CUDA_RUNTIME_LIBRARY defaults to "Static", cudart_static.lib) while the targets link the imported CUDA::cudart explicitly, so both libraries land on the link line. MSVC rejects the duplicated runtime symbols (LNK2005/LNK1169) - seen on a Windows sm_70 source build - while GNU ld tolerates them, so Linux builds never noticed. "Shared" makes the language rule agree with CUDA::cudart; an explicit -D still wins.
Contributor
Author
|
Closing — the official fix landed in v0.1.39: CMakeLists now sets |
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.
Fixes #585.
The final link of
strata.exefailed on a Windows sm_70 source build (MSVC 14.44, CUDA 12.4):cudart_static.lib(...)raised LNK2005 for every runtime symbol already defined incudart.lib(cudart64_12.dll), ending in LNK1169. Root cause:enable_language(CUDA)links theruntime per
CMAKE_CUDA_RUNTIME_LIBRARY(default Static ->cudart_static.lib), while theproject also links the imported
CUDA::cudarttarget explicitly - both libraries on one link line.GNU ld tolerates the duplicates, which is why the Pascal/Volta path (#295, tested on Linux) never
hit this on Linux.
The fix sets the language runtime to
Sharedso it agrees with the explicitCUDA::cudartlinks, guarded by
if(NOT DEFINED ...)so a user's explicit-Dstill wins.Verified on the reporting machine (V100-PCIE-32GB, Windows, CUDA 12.4 + MSVC):
link.exeline contains bothcudart.libandcudart_static.lib-> LNK1169, build fails-D): the generated link line references onlycudart.lib(178 occurrences,
cudart_static.libgone); the engine builds, runs, and serves - field numbersin V100-32GB field report: throughput, a thinking-budget pitfall, and Flash-125B vs Qwen3.8-27B on the same box #617 and PR docs: community benchmark row - Tesla V100-PCIE-32GB (sm_70 source build, before/after calibration) #707 come from this build (16.5 -> 33.5 tok/s after calibration, IQ3_XXS)