Crates.io | nvml-wrapper-sys |
lib.rs | nvml-wrapper-sys |
version | 0.8.0 |
source | src |
created_at | 2017-05-17 17:04:48.678026 |
updated_at | 2024-02-10 06:37:34.791236 |
description | Generated bindings to the NVIDIA Management Library. |
homepage | |
repository | https://github.com/Cldfire/nvml-wrapper |
max_upload_size | |
id | 14946 |
size | 355,243 |
Rust bindings for the NVIDIA Management Library (NVML), a C-based programmatic interface for monitoring and managing various states within NVIDIA GPUs.
It is intended to be a platform for building 3rd-party applications, and is also the underlying library for NVIDIA's nvidia-smi tool.
See nvml-wrapper
for a safe wrapper over top of these bindings.
These bindings were created using bindgen's feature to generate wrappers over top
of the functionality that the libloading
crate provides. This means
that they're designed for loading the NVML library at runtime; they are not suitable
for linking to NVML (statically or dynamically) at buildtime.
This choice was made because NVML is the type of library that you'd realistically always want to load at runtime, for the following reasons:
Loading NVML at runtime means it's possible to drop NVIDIA-related features at runtime on systems that don't have relevant hardware.
I would be willing to consider maintaining both types of bindings in this crate if there's a convincing reason to do so; please file an issue.
These bindings were generated for NVML version 11. Each new version of NVML is guaranteed to be backwards-compatible according to NVIDIA, so these bindings should be useful regardless of NVML version bumps.
Sometimes there will be function-level API version bumps in new NVML releases. For example:
nvmlDeviceGetComputeRunningProcesses
nvmlDeviceGetComputeRunningProcesses_v2
nvmlDeviceGetComputeRunningProcesses_v3
The older versions of the functions will generally continue to work with the newer NVML releases; however, the newer function versions will not work with older NVML installs.
By default these bindings only include the newest versions of the functions.
Enable the legacy-functions
feature if you require the ability to call older
functions.