Skip to content

Conversation

@oleksandr-pavlyk
Copy link
Collaborator

This PR builds on top of #290. Hence, it should be merged after #290 has been merged.

This PR moves doc-strings for Python objects exposed in cuda.bench namespace from __init__.pyi to implementation file, making doc-strings interactively available to the user. For example, help(cuda.bench.State) would not include doc-strings of the class itself as well as of its methods.

Closes #291

…it, runner loop is stopped and other pending benchmark instances are skipped
Add try/catch around Python calls to improve keyboard interrup
response.
These methods take reference to a boolean whose value signals whether
benchmark instances pending for execution are to be skipped.

void benchmark->run_or_skip(bool &) is called by Python to ensure
that KeyboardInterrupt is properly handled in scripts that contain
multiple benchmarks, or in case when single benchmark script is
executed on a machine with more than one device.
This loop uses benchmark.run_or_skip to resolve NVIDIA#284 even
for scripts that contain more than one benchmark, or when
a script with a single benchmark is executed when more than
one device is available.
…exception, on others benchmakr is to continue execution
Added tests that docstrings exist and are not empty.

This closes NVIDIA#291
@oleksandr-pavlyk oleksandr-pavlyk changed the title Add docstrings Equip python functions, classes, methods and exceptions with docstrings Dec 9, 2025
Use py::gil_safe_call_once_and_store facility pybind11 provides.
@oleksandr-pavlyk oleksandr-pavlyk marked this pull request as ready for review December 9, 2025 21:00
@oleksandr-pavlyk oleksandr-pavlyk self-assigned this Jan 6, 2026
@github-project-automation github-project-automation bot moved this to Todo in CCCL Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Python entities of Python API to NVBench should have docstrings

1 participant