[doc-only] cuda.bindings: clarify getLocalRuntimeVersion docstring#2202
Open
matysanchez wants to merge 1 commit into
Open
[doc-only] cuda.bindings: clarify getLocalRuntimeVersion docstring#2202matysanchez wants to merge 1 commit into
matysanchez wants to merge 1 commit into
Conversation
The docstring for getLocalRuntimeVersion() largely duplicated that of cudaRuntimeGetVersion() without explaining the actual behavioral difference. Update it to describe that this function dynamically locates the cudart shared library via cuda.pathfinder and queries that locally discovered library, whose version may differ from the cudart that cuda.bindings was built against. Closes NVIDIA#1062 Signed-off-by: matysanchez <matysanchez@users.noreply.github.com>
Contributor
|
For details, open this workflow run and click Summary. For external contributors: thank you for your interest in improving CUDA Python. The Please close this PR. If your changes also include updates outside If you are an NVIDIA employee and believe this label was applied in error, no action is needed; a maintainer will review and remove the label if appropriate. |
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.
Closes #1062
What
Rewrites the docstring for
getLocalRuntimeVersion()incuda_bindings/cuda/bindings/runtime.pyx.into clearly differentiate it fromcudaRuntimeGetVersion():getLocalRuntimeVersion()locates the CUDA Runtime shared library on the host viacuda.pathfinder.load_nvidia_dynamic_liband callscudaRuntimeGetVersionfrom that dynamically loaded library. The result reflects the locally discoveredcudartversion.cudaRuntimeGetVersion()returns the versioncuda.bindingswas built against — a compile-time constant.Also drops a stray "compile-time constant" sentence from the
getLocalRuntimeVersiondocstring that actually describescudaRuntimeGetVersion(originally copy-pasted between the two), and addscudaRuntimeGetVersionto the See Also section so readers can compare directly.Why
Per #1062, the two functions' docstrings were nearly identical and didn't explain the distinction, leaving users without a way to choose between them.
Tested
getLocalRuntimeVersioncalls into pathfinder;cudaRuntimeGetVersionreflects the build-time constant).getLocalRuntimeVersionshim.:py:obj:) preserved; section structure (Returns / Notes / See Also) unchanged.Verification