Draft of Python API for NVBench

The prototype is based on pybind11 to minimize boiler-plate
code needed to deal with move-only semantics of many nvbench
classes.
This commit is contained in:
Oleksandr Pavlyk
2025-06-30 14:30:15 -05:00
parent a9fb32e25d
commit 6552ef503c
8 changed files with 706 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import importlib.metadata
from cuda.bindings.path_finder import ( # type: ignore[import-not-found]
_load_nvidia_dynamic_library,
)
try:
__version__ = importlib.metadata.version("pynvbench")
except Exception:
__version__ = "0.0.0dev"
for libname in ("cupti", "nvperf_target", "nvperf_host"):
_load_nvidia_dynamic_library(libname)
from ._nvbench import * # noqa: E402, F403
from ._nvbench import register, run_all_benchmarks # noqa: E402
__all__ = ["register", "run_all_benchmarks"]