mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-04-19 22:38:52 +00:00
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:
18
python/cuda/nvbench/__init__.py
Normal file
18
python/cuda/nvbench/__init__.py
Normal 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"]
|
||||
Reference in New Issue
Block a user