[FIX]: pathfinder: Add missing static-lib CUDA 12 path for Windows conda layouts.#2015
Open
[FIX]: pathfinder: Add missing static-lib CUDA 12 path for Windows conda layouts.#2015
Conversation
Look for cudadevrt under both Library/lib/x64 and Library/lib so CUDA 12 conda environments resolve the real static library instead of falling through to a misleading CUDA_PATH error. Made-with: Cursor
Contributor
|
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. |
Contributor
Author
|
/ok 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.
Latent bug discovered while testing PR #1977 (xref issue #1038) with Windows Conda.
Source change —
find_static_lib.py_StaticLibInfoschema had a single conda lookup directory per library (conda_rel_path: str). On Windows that was hard-coded toLibrary/lib/x64, but only CUDA 13 conda environments laycudadevrt.libout that way; CUDA 12 conda environments put it inLibrary/lib. So on a Windows + CUDA 12 conda setup, pathfinder skipped the conda anchor entirely and fell through toCUDA_PATH, often producing a misleading "not found" error pointing at the wrong location.conda_rel_paths: tuple[str, ...]) so each lib can declare every layout it knows about. Forcudadevrt:("lib/x64", "lib")— try the CUDA 13 layout first, fall back to the CUDA 12 layout.("lib",)— unchanged, single entry._FindStaticLib.try_with_conda_prefixnow loops throughself.conda_rel_pathsand returns the first hit instead of probing one fixed subdirectory.Test change —
test_find_static_lib.pytest_locate_static_lib_search_order) is updated mechanically:CUDADEVRT_INFO["conda_rel_path"]→CUDADEVRT_INFO["conda_rel_paths"][0].test_locate_static_lib_conda_rel_path_fallback:"missing-first") when the platform only ships a single path. On Windows, where the tuple already has two entries, it uses them as-is.locate_static_lib("cudadevrt")finds it withfound_via="conda".Real (not mock-based) testing was reported here: