Uh oh!
There was an error while loading. Please reload this page.
feat(pathfinder): support finding static libraries like libcudadevrt.a - #1690
Merged
Conversation
Contributor
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
cpcloud
commented
Feb 25, 2026
ContributorAuthor
/ok to test |
This comment has been minimized.
This comment has been minimized.
cpcloud
commented
Feb 25, 2026
ContributorAuthor
/ok to test |
NVIDIA#716) Add locate_static_lib() and find_static_lib() APIs to cuda.pathfinder for discovering native static libraries (e.g. libcudadevrt.a on Linux, cudadevrt.lib on Windows). Searches site-packages, conda, and CUDA_HOME/CUDA_PATH in that order, matching the existing bitcode lib pattern. Update cuda_core's device launch test to use the new API. Co-authored-by: Cursor <cursoragent@cursor.com>
The pathfinder now finds libcudadevrt.a via site-packages even without CUDA_HOME, but the found library may be version-incompatible with the local toolkit. Catch linker errors and skip gracefully. Co-authored-by: Cursor <cursoragent@cursor.com>
The pathfinder finds libcudadevrt.a via site-packages, which may be version-incompatible with the local CTK the test compiles against. Leave the test helper as-is for now; migrating it to pathfinder requires version-aware discovery. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the manual _find_cudadevrt_library() helper with
cuda.pathfinder.find_static_lib("cudadevrt").
Co-authored-by: Cursor <cursoragent@cursor.com>When LOCAL_CTK=1, the pip dependency group test-cu13 pulls in cuda-toolkit[cudart]==13.* which resolves to the latest 13.x pip wheel. This can install nvidia-cuda-runtime from a newer minor version than the local CTK, causing version mismatches (e.g., nvjitlink 13.0 rejecting a 13.1 libcudadevrt.a). Constrain cuda-toolkit to CUDA_VER's major.minor so pip installs a version consistent with the local CTK. ClosesNVIDIA#1691 Co-authored-by: Cursor <cursoragent@cursor.com>
cpcloud
commented
Feb 25, 2026
ContributorAuthor
/ok to test |
rwgk
commented
Feb 26, 2026
Contributor
I downloaded the GHA log archive, then: Cursor-generated source for completeness: |
rwgk
approved these changes
Feb 26, 2026
rwgk
left a comment
Contributor
There was a problem hiding this comment.
Approving, the production code is great, my only worry is the except ImportError. (And maybe we can make the bitcode_lib/static_lib implementations more DRY later?)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ch test Made-with: Cursor
…pend Made-with: Cursor
cpcloud
commented
Feb 26, 2026
ContributorAuthor
/ok to test |
cpcloud
enabled auto-merge (squash)
February 26, 2026 11:33
Uh oh!
There was an error while loading. Please reload this page.
|
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 freeto 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.
Summary
locate_static_lib()andfind_static_lib()APIs tocuda.pathfinderfor discovering native static libraries (e.g.libcudadevrt.aon Linux,cudadevrt.libon Windows).CUDA_HOME/CUDA_PATHin that order, matching the existing bitcode lib pattern.cuda_core's device launch test to use the new pathfinder API instead of the manual_find_cudadevrt_library()helper.Closes#716
Test plan
test_find_static_lib.pycovers search order, error messages, missing CUDA_HOME, and invalid names.Made with Cursor