Port changes to the package from #323 (#337)

Fixed relative text alignment in docstrings to fix autodoc warnigns

Renamed cuda.bench.test_cpp_exception and cuda.bench.test_py_exception functions
to start with underscore, signaling that these functions are internal and should
not be documented

Account for test_cpp_exceptions -> _test_cpp_exception, same for *_py_*

Make sure to reset __module__ of reexported symbols to be cuda.bench
This commit is contained in:
Oleksandr Pavlyk
2026-04-22 08:28:15 -05:00
committed by GitHub
parent b0a46f44c2
commit a3364ca5c7
3 changed files with 23 additions and 14 deletions

View File

@@ -69,12 +69,21 @@ NVBenchRuntimeError = _nvbench_module.NVBenchRuntimeError
State = _nvbench_module.State
register = _nvbench_module.register
run_all_benchmarks = _nvbench_module.run_all_benchmarks
test_cpp_exception = _nvbench_module.test_cpp_exception
test_py_exception = _nvbench_module.test_py_exception
_test_cpp_exception = _nvbench_module._test_cpp_exception
_test_py_exception = _nvbench_module._test_py_exception
# Expose the module as _nvbench for backward compatibility (e.g., for tests)
_nvbench = _nvbench_module
# Set module of exposed objects
Benchmark.__module__ = __name__
CudaStream.__module__ = __name__
Launch.__module__ = __name__
NVBenchRuntimeError.__module__ = __name__
State.__module__ = __name__
register.__module__ = __name__
run_all_benchmarks.__module__ = __name__
# Clean up internal symbols
del (
_nvbench_module,