Add license to stub fuile, add comment about syncing impl and stubs

Add comments stating the need to keep implementation and Python stub
file in sync to both files. In the stub file to comment documents
use of mypy's stubgen to generate stubs and calls to compare that against
current stubs. It also calls out the need to keep docstrings and
doctring examples in sync with implementation.
This commit is contained in:
Oleksandr Pavlyk
2025-07-24 09:52:53 -05:00
parent a69a3647b2
commit 480614e847
2 changed files with 34 additions and 6 deletions

View File

@@ -209,6 +209,12 @@ constinit std::unique_ptr<GlobalBenchmarkRegistry, py::nodelete> global_registry
} // end of anonymous namespace
// ==========================================
// PLEASE KEEP IN SYNC WITH __init__.pyi FILE
// ==========================================
// If you modify these bindings, please be sure to update the
// corresponding type hints in ``../cuda/nvbench/__init__.pyi``
PYBIND11_MODULE(_nvbench, m)
{
// == STEP 1
@@ -223,9 +229,6 @@ PYBIND11_MODULE(_nvbench, m)
// It is reinitialized before running all benchmarks to set devices to use
nvbench::benchmark_manager::get().initialize();
// TODO: Use cuModuleGetLoadingMode(&mode) to confirm that (mode == CU_MODULE_EAGER_LOADING)
// and issue warning otherwise
// == STEP 2
// Define CudaStream class
// ATTN: nvbench::cuda_stream is move-only class