-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documented return types in cudart.pyx are inconsistent with implementation. #15
Comments
Thanks for the notice! Fix submitted. |
Thank you @vzhurba01! 😊 |
vzhurba01
added a commit
that referenced
this issue
Oct 3, 2022
Squash existing commits, preserving description history: Preserve the original commit fixes to quickstart docs feedback removed docs rendering from main branch overview -> motivation more feedback re-adding docs Revert GIT HEAD to v11.4.0 Rebase to CTK 11.5 Update docs to CTK 11.5 Add EGL, GL, VDPAU as unsupported APIs Fix Numba link in motivation.html Closes #10 Docs Overview: Note for correct gpu-architecture By default the example uses Turing architecture. Add a note for when the first detectable incompatibility occures (i.e. when calling cuModuleLoadData) Update docs with Future of CUDA Python Revert "Update docs with Future of CUDA Python" This reverts commit 71ca262. Update docs with Future of CUDA Python Resolve doc consistency errors - Missing parameters fields - Missing return fields - Remove None None return value for APIs with single tuple attribute - Assumes each API returns a tuple - Returns description describe each valid tuple element Fixes #15 Patch fixes for error handling and C type interoperability
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The function signature of many APIs in the docs appear to return a 2-tuple like
(status, None)
but the actual return value is a 1-tuple like(status,)
.For example:
Docs link: https://nvidia.github.io/cuda-python/api.html#cuda.cudart.cudaSetDevice
Source:
cuda-python/cuda/cudart.pyx
Lines 7903 to 7910 in d7a354d
Rendered docs:
In some cases, there is a second element like a string or memory pool in the tuple but the documented type indicates it as
None
.For example:
cuda-python/cuda/cudart.pyx
Lines 7164 to 7193 in d7a354d
cuda-python/cuda/cudart.pyx
Lines 7641 to 7670 in d7a354d
Let me know if you'd like me to work on this issue. I would be happy to contribute a pull request to improve the docs. 👍I see PRs are not currently accepted.The text was updated successfully, but these errors were encountered: