Skip to content

Commit c020dbe

Browse files
committed
Fix Windows preview mini-CTK lib layout for linker.
Merge component libs into lib/x64 or lib/arm64 so cuda_bindings can find cudart_static.lib, and bump the prerelease cache key to drop stale flat-lib entries.
1 parent 1ff67b7 commit c020dbe

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎.github/actions/fetch_ctk/action.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ runs:
5656
"$(python "$CTK_REDIST_TOOL" preview-installer \
5757
--host-platform "${{ inputs.host-platform }}" \
5858
--cuda-version "${{ inputs.cuda-version }}")"
59-
CTK_CACHE_COMPONENTS="${CTK_PREVIEW_INSTALLER_URL}:${CTK_PREVIEW_INSTALLER_SHA256}:${CTK_CACHE_COMPONENTS}"
59+
# layout-v2: preserve lib/<arch>/ (Windows builds link against lib/x64 or lib/arm64)
60+
CTK_CACHE_COMPONENTS="${CTK_PREVIEW_INSTALLER_URL}:${CTK_PREVIEW_INSTALLER_SHA256}:layout-v2:${CTK_CACHE_COMPONENTS}"
6061
else
6162
echo "CUDA prerelease packages are not supported for host-platform ${{ inputs.host-platform }}" >&2
6263
exit 1

‎ci/tools/fetch_ctk_redistrib.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,11 @@ def merge_windows_preview_ctk(
262262
if not component_root.exists():
263263
raise ValueError(f"CUDA prerelease installer did not provide {component_root}")
264264

265+
lib_dir = destination / "lib" / arch
266+
265267
if component == "cuda_nvrtc":
266268
_merge_tree(component_root / "nvrtc_dev/include", destination / "include")
267-
_merge_tree(component_root / "nvrtc_dev/lib" / arch, destination / "lib")
269+
_merge_tree(component_root / "nvrtc_dev/lib" / arch, lib_dir)
268270
_merge_tree(component_root / "nvrtc/bin" / arch, destination / "bin")
269271
continue
270272

@@ -284,7 +286,7 @@ def merge_windows_preview_ctk(
284286
_merge_tree(component_root / "bin", destination / "bin")
285287
arch_lib = component_root / "lib" / arch
286288
if arch_lib.exists():
287-
_merge_tree(arch_lib, destination / "lib")
289+
_merge_tree(arch_lib, lib_dir)
288290

289291
if not (destination / "include").is_dir() or not (destination / "bin/nvcc.exe").is_file():
290292
raise ValueError("CUDA prerelease installer did not provide the expected toolkit layout")

0 commit comments

Comments
 (0)