NVIDIA / NVIDIA/cuda-python

[DOC]: C API doc strings don't always make sense with python bindings

Open
#721 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

blocked cuda.bindings documentation enhancement
Dominant language
Cython
Stars
3.4k
Forks
329
Avg merge
1d 23h
Merged PRs (30d)
116

Description

Is this a duplicate?
Is this for new documentation, or an update to existing docs?

Update

Describe the incorrect/future/missing documentation
Image cuda-bindings turns some c api arguments into returns, and yet it still reuses C API doc strings that don't make sense. See e.g. on enclosed screenshot, `from and to may both be NULL`, but user doesn't control `from` and `to` so user cannot set them to NULL. There's also broken formatting where things that should not be italicized are italicized. The doc should be something like "if numEdges is 0, `to` and `from` are returned as empty lists, and the function only returns the number of edges in `numEdges`. Otherwise, `to` and `from` will have `numEdges` entries" NULL also doesn't make sense in python context.
If this is a correction, please provide a link to the incorrect documentation. If this is a new documentation request, please link to where you have looked.

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Python-facing documentation that reuses the C API strings shown in the screenshot, then compare its parameter and return descriptions with the binding behavior. Done means the affected docs describe returned lists and Python values rather than user-controlled C arguments or NULL, with corrected formatting.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.