pub enum FieldIdScheme {
V12,
V13Update1,
}Expand description
The main struct that this library revolves around.
According to NVIDIA’s documentation, “It is the user’s responsibility to call nvmlInit()
before calling any other methods, and nvmlShutdown() once NVML is no longer being used.”
This struct is used to enforce those rules.
Also according to NVIDIA’s documentation, “NVML is thread-safe so it is safe to make
simultaneous NVML calls from multiple threads.” In the Rust world, this translates to NVML
being Send + Sync. You can .clone() an Arc wrapped NVML and enjoy using it on any thread.
NOTE: If you care about possible errors returned from nvmlShutdown(), use the .shutdown()
method on this struct. The Drop implementation ignores errors.
When reading documentation on this struct and its members, remember that a lot of it, especially in regards to errors returned, is copied from NVIDIA’s docs. While they can be found online here, the hosted docs sometimes outdated and may not accurately reflect the version of NVML that this library is written for; beware. You should ideally read the doc comments on an up-to-date NVML API header. Such a header can be downloaded as part of the CUDA toolkit. Describes which field ID numbering scheme the loaded NVML driver uses for IDs 251-273. NVIDIA broke ABI compatibility for these IDs between the original CUDA 13.0 release and CUDA 13.0 Update 1 (driver >= 580.82).
See https://docs.nvidia.com/deploy/nvml-api/known-issues.html
Variants§
V12
Used by drivers before 580.82 (CUDA 12.x and original CUDA 13.0). IDs 251-255 are CLOCKS_EVENT_REASON/POWER_SYNC, 256-273 are PWR_SMOOTHING.
V13Update1
Used by drivers >= 580.82 (CUDA 13.0 Update 1+). IDs 251-268 are PWR_SMOOTHING, 269-273 are CLOCKS_EVENT_REASON/POWER_SYNC.
Trait Implementations§
Source§impl Clone for FieldIdScheme
impl Clone for FieldIdScheme
Source§fn clone(&self) -> FieldIdScheme
fn clone(&self) -> FieldIdScheme
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more