Struct nvml_wrapper::device::Device
[−]
[src]
pub struct Device<'nvml> { /* fields omitted */ }
Struct that represents a device on the system.
Obtain a Device
with the various methods available to you on the NVML
struct.
Rust's lifetimes will ensure that the NVML instance this Device
was created from is
not allowed to be shutdown until this Device
is dropped, meaning you shouldn't
have to worry about calls returning Uninitialized
errors.
Methods
impl<'nvml> Device<'nvml>
[src]
fn is_api_restricted(&self, api: Api) -> Result<bool>
Gets the root/admin permissions for the target API.
Only root users are able to call functions belonging to restricted APIs. See
the documentation for the RestrictedApi
enum for a list of those functions.
Non-root users can be granted access to these APIs through use of
.set_api_restricted()
.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalid or the apiType is invalid (may occur if the C lib changes dramatically?)NotSupported
, if this query is not supported by thisDevice
or thisDevice
does not support the feature that is being queried (e.g. enabling/disabling auto boosted clocks is not supported by thisDevice
).GpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports all fully supported products.
fn applications_clock(&self, clock_type: Clock) -> Result<u32>
Gets the current clock setting that all applications will use unless an overspec situation occurs.
This setting can be changed using .set_applications_clocks()
.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalid or the clockType is invalid (may occur if the C lib changes dramatically?)NotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler or newer fully supported devices.
fn auto_boosted_clocks_enabled(&self) -> Result<AutoBoostClocksEnabledInfo>
Gets the current and default state of auto boosted clocks.
Auto boosted clocks are enabled by default on some hardware, allowing the GPU to run as fast as thermals will allow it to.
On Pascal and newer hardware, auto boosted clocks are controlled through application
clocks. Use .set_applications_clocks()
and .reset_applications_clocks()
to control
auto boost behavior.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support auto boosted clocksGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler or newer fully supported devices.
fn bar1_memory_info(&self) -> Result<BAR1MemoryInfo>
Gets the total, available and used size of BAR1 memory.
BAR1 memory is used to map the FB (device memory) so that it can be directly accessed by the CPU or by 3rd party devices (peer-to-peer on the PCIe bus).
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this queryGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler or newer fully supported devices.
fn board_id(&self) -> Result<u32>
Gets the board ID for this Device
, from 0-N.
Devices with the same boardID indicate GPUs connected to the same PLX. Use in
conjunction with .is_multi_gpu_board()
to determine if they are on the same
board as well.
The boardID returned is a unique ID for the current config. Uniqueness and ordering across reboots and system configs is not guaranteed (i.e if a Tesla K40c returns 0x100 and the two GPUs on a Tesla K10 in the same system return 0x200, it is not guaranteed that they will always return those values. They will, however, always be different from each other).
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi or newer fully supported devices.
fn brand(&self) -> Result<Brand>
Gets the brand of this Device
.
See the Brand
enum for documentation of possible values.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnexpectedVariant
, check that error's docs for more infoUnknown
, on any unexpected error
fn bridge_chip_info(&self) -> Result<BridgeChipHierarchy>
Gets bridge chip information for all bridge chips on the board.
Only applicable to multi-GPU devices.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports all fully supported devices.
fn clock(&self, clock_type: Clock, clock_id: ClockId) -> Result<u32>
Gets this Device
's current clock speed for the given Clock
type and ClockId
.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if thisDevice
is invalid orclock_type
is invalid (shouldn't occur?)NotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices.
fn max_customer_boost_clock(&self, clock_type: Clock) -> Result<u32>
Gets this Device
's customer-defined maximum boost clock speed for the
given Clock
type.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if thisDevice
is invalid orclock_type
is invalid (shouldn't occur?)NotSupported
, if thisDevice
or theclock_type
on thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Maxwell and newer fully supported devices.
fn compute_mode(&self) -> Result<ComputeMode>
Gets the current compute mode for this Device
.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if thisDevice
is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnexpectedVariant
, check that error's docs for more infoUnknown
, on any unexpected error
fn clock_info(&self, clock_type: Clock) -> Result<u32>
Gets this Device
's current clock speed for the given Clock
type.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if thisDevice
is invalidNotSupported
, if thisDevice
cannot report the specified clockGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi or newer fully supported devices.
fn running_compute_processes(&self) -> Result<Vec<ProcessInfo>>
Gets information about processes with a compute context running on this Device
.
This only returns information about running compute processes (such as a CUDA application with an active context). Graphics applications (OpenGL, DirectX) won't be listed by this function.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
fn running_compute_processes_count(&self) -> Result<u32>
Gets the number of processes with a compute context running on this Device
.
This only returns the count of running compute processes (such as a CUDA application with an active context). Graphics applications (OpenGL, DirectX) won't be counted by this function.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
fn current_pcie_link_gen(&self) -> Result<u32>
Gets the current PCIe link generation.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if PCIe link information is not availableGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi or newer fully supported devices.
fn current_pcie_link_width(&self) -> Result<u32>
Gets the current PCIe link width.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if PCIe link information is not availableGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi or newer fully supported devices.
fn decoder_utilization(&self) -> Result<UtilizationInfo>
Gets the current utilization and sampling size (sampling size in μs) for the Decoder.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler or newer fully supported devices.
fn default_applications_clock(&self, clock_type: Clock) -> Result<u32>
Gets the default applications clock that this Device
boots with or defaults to after
reset_applications_clocks()
.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler or newer fully supported devices.
fn detailed_ecc_errors(
&self,
error_type: MemoryError,
counter_type: EccCounter
) -> Result<EccErrorCounts>
&self,
error_type: MemoryError,
counter_type: EccCounter
) -> Result<EccErrorCounts>
: use Device.memory_error_counter()
Not documenting this because it's deprecated. Read NVIDIA's docs if you must use it.
fn is_display_active(&self) -> Result<bool>
Gets the display active state for the device.
This method indicates whether a display is initialized on this Device
.
For example, whether or not an X Server is attached to this device and
has allocated memory for the screen.
A display can be active even when no monitor is physically attached to this Device
.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
fn is_display_connected(&self) -> Result<bool>
Gets whether a physical display is currently connected to any of this Device
's
connectors.
This calls the C function nvmlDeviceGetDisplayMode
.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
fn driver_model(&self) -> Result<DriverModelState>
Gets the current and pending driver model for this Device
.
On Windows, the device driver can run in either WDDM or WDM (TCC) modes. If a display is attached to the device it must run in WDDM mode. TCC mode is preferred if a display is not attached.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if the platform is not WindowsGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi and newer fully supported devices.
Platform Support
Only supports Windows.
fn is_ecc_enabled(&self) -> Result<EccModeState>
Get the current and pending ECC modes for the device.
Changing ECC modes requires a reboot. The "pending" ECC mode refers to the target mode following the next reboot.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi and newer fully supported devices. Only applicable to devices with
ECC. Requires InfoRom::ECC
version 1.0 or higher.
fn encoder_utilization(&self) -> Result<UtilizationInfo>
Gets the current utilization and sampling size (sampling size in μs) for the Encoder.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler or newer fully supported devices.
fn enforced_power_limit(&self) -> Result<u32>
Gets the effective power limit in milliwatts that the driver enforces after taking into account all limiters.
Note: This can be different from the .power_management_limit()
if other limits
are set elswhere. This includes the out-of-band power limit interface.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler or newer fully supported devices.
fn fan_speed(&self) -> Result<u32>
Gets the intended operating speed of this Device
's fan as a percentage of the
maximum fan speed (100%).
Note: The reported speed is the intended fan speed. If the fan is physically blocked and unable to spin, the output will not match the actual fan speed.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not have a fanGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports all discrete products with dedicated fans.
fn gpu_operation_mode(&self) -> Result<OperationModeState>
Gets the current GPU operation mode and the pending one (that it will switch to after a reboot).
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports GK110 M-class and X-class Tesla products from the Kepler family. Modes LowDP
and AllOn
are supported on fully supported GeForce products. Not supported
on Quadro and Tesla C-class products.
fn running_graphics_processes(&self) -> Result<Vec<ProcessInfo>>
Gets information about processes with a graphics context running on this Device
.
This only returns information about graphics based processes (OpenGL, DirectX).
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
fn running_graphics_processes_count(&self) -> Result<u32>
Gets the number of processes with a graphics context running on this Device
.
This only returns the count of graphics based processes (OpenGL, DirectX).
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
fn index(&self) -> Result<u32>
Gets the NVML index of this Device
.
Keep in mind that the order in which NVML enumerates devices has no guarantees of consistency between reboots. Also, the NVML index may not correlate with other APIs, such as the CUDA device index.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessible
fn config_checksum(&self) -> Result<u32>
Gets the checksum of the config stored in the device's infoROM.
Can be used to make sure that two GPUs have the exact same configuration. The current checksum takes into account configuration stored in PWR and ECC infoROM objects. The checksum can change between driver released or when the user changes the configuration (e.g. disabling/enabling ECC).
Errors
CorruptedInfoROM
, if the device's checksum couldn't be retrieved due to infoROM corruptionUninitialized
, if the library has not been successfully initializedNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports all devices with an infoROM.
fn info_rom_image_version(&self) -> Result<String>
Gets the global infoROM image version.
This image version, just like the VBIOS version, uniquely describes the exact version of the infoROM flashed on the board, in contrast to the infoROM object version which is only an indicator of supported features.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not have an infoROMGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUtf8Error
, if the string obtained from the C function is not valid Utf8Unknown
, on any unexpected error
Why is CorruptedInfoROM
not mentioned? Your guess is as good as mine. While we're
at it, why is this one of two functions I've seen so far that does not say that
it will return InvalidArg
if the device is invalid, like every other device
function? Hmm.
Device Support
Supports all devices with an infoROM.
fn info_rom_version(&self, object: InfoRom) -> Result<String>
Gets the version information for this Device
's infoROM object, for the passed in
object type.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not have an infoROMGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUtf8Error
, if the string obtained from the C function is not valid UTF-8Unknown
, on any unexpected error
Device Support
Supports all devices with an infoROM.
Fermi and higher parts have non-volatile on-board memory for persisting device info, such as aggregate ECC counts. The version of the data structures in this memory may change from time to time.
fn max_clock_info(&self, clock_type: Clock) -> Result<u32>
Gets the maximum clock speeds for this Device
.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
cannot report the specifiedClock
GpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi and newer fully supported devices.
Note: On GPUs from the Fermi family, current P0 (Performance state 0?) clocks
(reported by .clock_info()
) can differ from max clocks by a few MHz.
fn max_pcie_link_gen(&self) -> Result<u32>
Gets the max PCIe link generation possible with this Device
and system.
For a gen 2 PCIe device attached to a gen 1 PCIe bus, the max link generation this function will report is generation 1.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if PCIe link information is not availableGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi and newer fully supported devices.
fn max_pcie_link_width(&self) -> Result<u32>
Gets the maximum PCIe link width possible with this Device
and system.
For a device with a 16x PCie bus width attached to an 8x PCIe system bus, this method will report a max link width of 8.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if PCIe link information is not availableGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi and newer fully supported devices.
fn memory_error_counter(
&self,
error_type: MemoryError,
counter_type: EccCounter,
location: MemoryLocation
) -> Result<u64>
&self,
error_type: MemoryError,
counter_type: EccCounter,
location: MemoryLocation
) -> Result<u64>
Gets the requested memory error counter for this Device
.
Only applicable to devices with ECC. Requires ECC mode to be enabled.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, iferror_type
,counter_type
, orlocation
is invalid (shouldn't occur?)NotSupported
, if thisDevice
does not support ECC error reporting for the specified memoryGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi and newer fully supported devices. Requires InfoRom::ECC
version
2.0 or higher to report aggregate location-based memory error counts. Requires
`InfoRom::ECC version 1.0 or higher to report all other memory error counts.
fn memory_info(&self) -> Result<MemoryInfo>
Gets the amount of used, free and total memory available on the device, in bytes.
Note that enabling ECC reduces the amount of total available memory due to the extra required parity bits.
Also note that on Windows, most device memory is allocated and managed on startup by Windows.
Under Linux and Windows TCC (no physical display connected), the reported amount of used memory is equal to the sum of memory allocated by all active channels on the device.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
fn is_multi_gpu_board(&self) -> Result<bool>
Identifies whether or not this Device
is on a multi-GPU board.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi or newer fully supported devices.
fn name(&self) -> Result<String>
The name of this Device
, e.g. "Tesla C2070".
The name is an alphanumeric string that denotes a particular product.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUtf8Error
, if the string obtained from the C function is not valid Utf8Unknown
, on any unexpected error
fn pci_info(&self) -> Result<PciInfo>
Gets the PCI attributes of this Device
.
See PciInfo
for details about the returned attributes.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidGpuLost
, if the GPU has fallen off the bus or is otherwise inaccessibleUtf8Error
, if a string obtained from the C function is not valid Utf8Unknown
, on any unexpected error
fn pcie_replay_counter(&self) -> Result<u32>
Gets the PCIe replay counter.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler or newer fully supported devices.
fn pcie_throughput(&self, counter: PcieUtilCounter) -> Result<u32>
Gets PCIe utilization information in KB/s.
The function called within this method is querying a byte counter over a 20ms interval and thus is the PCIE throughput over that interval.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalid orcounter
is invalid (shouldn't occur?)NotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Maxwell and newer fully supported devices.
Environment Support
This method is not supported in virtualized GPU environments.
fn performance_state(&self) -> Result<PerformanceState>
Gets the current performance state for this Device
. 0 == max, 15 == min.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi or newer fully supported devices.
fn power_management_limit_default(&self) -> Result<u32>
Gets the default power management limit for this Device
, in milliwatts.
This is the limit that this Device
boots with.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler or newer fully supported devices.
fn power_management_limit(&self) -> Result<u32>
Gets the power management limit associated with this Device
.
The power limit defines the upper boundary for the card's power draw. If the card's total power draw reaches this limit, the power management algorithm kicks in.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi or newer fully supported devices.
This reading is only supported if power management mode is supported. See
.is_power_management_algo_active()
. Yes, it's deprecated, but that's what
NVIDIA's docs said to see.
fn power_management_limit_constraints(
&self
) -> Result<PowerManagementConstraints>
&self
) -> Result<PowerManagementConstraints>
Gets information about possible power management limit values for this Device
, in milliwatts.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler or newer fully supported devices.
fn is_power_management_algo_active(&self) -> Result<bool>
: NVIDIA states that "this API has been deprecated."
Not documenting this because it's deprecated. Read NVIDIA's docs if you must use it.
fn power_state(&self) -> Result<PerformanceState>
: use .performance_state()
.
Not documenting this because it's deprecated. Read NVIDIA's docs if you must use it.
fn power_usage(&self) -> Result<u32>
Gets the power usage for this GPU and its associated circuitry (memory) in milliwatts.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support power readingsGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi and newer fully supported devices.
This reading is accurate to within +/- 5% of current power draw on Fermi and Kepler GPUs.
It is only supported if power management mode is supported. See .is_power_management_algo_active()
.
Yes, that is deperecated, but that's what NVIDIA's docs say to see.
fn retired_pages(&self, cause: RetirementCause) -> Result<Vec<u64>>
Gets the list of retired pages filtered by cause
, including pages pending retirement.
I cannot verify that this method will work because the call within is not supported on my dev machine. Please verify for yourself that it works before you use it. If you are able to test it on your machine, please let me know if it works; if it doesn't, I would love a PR.
The address information provided by this API is the hardware address of the page that was retired. Note that this does not match the virtual address used in CUDA, but it will match the address information in XID 63.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
doesn't support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices.
fn are_pages_pending_retired(&self) -> Result<bool>
Gets whether there are pages pending retirement (they need a reboot to fully retire).
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
doesn't support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices.
fn serial(&self) -> Result<String>
Gets the globally unique board serial number associated with this Device
's board
as an alphanumeric string.
This serial number matches the serial number tag that is physically attached to the board.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
doesn't support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUtf8Error
, if the string obtained from the C function is not valid Utf8Unknown
, on any unexpected error
Device Support
Supports all products with an infoROM.
fn board_part_number(&self) -> Result<String>
Gets the board part number for this Device
.
The board part number is programmed into the board's infoROM.
Errors
Uninitialized
, if the library has not been successfully initializedNotSupported
, if the necessary VBIOS fields have not been filledGpuLost
, if the target GPU has fellen off the bus or is otherwise inaccessibleUtf8Error
, if the string obtained from the C function is not valid Utf8Unknown
, on any unexpected error
fn current_throttle_reasons(&self) -> Result<ThrottleReasons>
Gets current throttling reasons.
Note that multiple reasons can be affecting clocks at once.
Errors
Uninitialized
, if the library has not been successfully initializedNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports all fully supported devices.
fn supported_throttle_reasons(&self) -> Result<ThrottleReasons>
Gets a bitmask of the supported throttle reasons.
These reasons can be returned by .current_throttle_reasons()
.
Errors
Uninitialized
, if the library has not been successfully initializedGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports all fully supported devices.
Environment Support
This method is not supported in virtualized GPU environments.
fn supported_graphics_clocks(&self, for_mem_clock: u32) -> Result<Vec<u32>>
Gets a Vec
of possible graphics clocks that can be used as an arg for
set_applications_clocks()
.
Errors
Uninitialized
, if the library has not been successfully initializedNotFound
, if the specifiedfor_mem_clock
is not a supported frequencyInvalidArg
, if the device is invalidNotSupported
, if thisDevice
doesn't support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices.
fn supported_memory_clocks(&self) -> Result<Vec<u32>>
Gets a Vec
of possible memory clocks that can be used as an arg for
set_applications_clocks()
.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
doesn't support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices.
fn temperature(&self, sensor: TemperatureSensor) -> Result<u32>
Gets the current temperature readings for the given sensor, in °C.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalid orsensor
is invalid (shouldn't occur?)NotSupported
, if thisDevice
does not have the specified sensorGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
fn temperature_threshold(
&self,
threshold_type: TemperatureThreshold
) -> Result<u32>
&self,
threshold_type: TemperatureThreshold
) -> Result<u32>
Gets the temperature threshold for this Device
and the specified threshold_type
, in °C.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalid orthreshold_type
is invalid (shouldn't occur?)NotSupported
, if thisDevice
does not have a temperature sensor or is unsupportedGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices.
fn total_ecc_errors(
&self,
error_type: MemoryError,
counter_type: EccCounter
) -> Result<u64>
&self,
error_type: MemoryError,
counter_type: EccCounter
) -> Result<u64>
Gets the total ECC error counts for this Device
.
Only applicable to devices with ECC. The total error count is the sum of errors across each of the separate memory systems, i.e. the total set of errors across the entire device.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalid or either enum is invalid (shouldn't occur?)NotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi and newer fully supported devices. Requires InfoRom::ECC
version 1.0
or higher. Requires ECC mode to be enabled.
fn uuid(&self) -> Result<String>
Gets the globally unique immutable UUID associated with this Device
as a 5 part
hexadecimal string.
This UUID augments the immutable, board serial identifier. It is a globally unique identifier and is the only available identifier for pre-Fermi-architecture products. It does NOT correspond to any identifier printed on the board.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUtf8Error
, if the string obtained from the C function is not valid Utf8Unknown
, on any unexpected error
Examples
The UUID can be used to compare two Device
s and find out if they represent
the same physical device:
if device1.uuid()? == device2.uuid()? { println!("`device1` represents the same physical device that `device2` does."); }
fn utilization_rates(&self) -> Result<Utilization>
Gets the current utilization rates for this Device
's major subsystems.
Note: During driver initialization when ECC is enabled, one can see high GPU and memory utilization readings. This is caused by the ECC memory scrubbing mechanism that is performed during driver initialization.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi and newer fully supported devices.
fn vbios_version(&self) -> Result<String>
Gets the VBIOS version of this Device
.
The VBIOS version may change from time to time.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUtf8Error
, if the string obtained from the C function is not valid UTF-8Unknown
, on any unexpected error
fn violation_status(
&self,
perf_policy: PerformancePolicy
) -> Result<ViolationTime>
&self,
perf_policy: PerformancePolicy
) -> Result<ViolationTime>
Gets the duration of time during which this Device
was throttled (lower than the
requested clocks) due to power or thermal constraints.
This is important to users who are trying to understand if their GPUs throttle at any point while running applications. The difference in violation times at two different reference times gives the indication of a GPU throttling event.
Violation for thermal capping is not supported at this time.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if the device is invalid orperf_policy
is invalid (shouldn't occur?)NotSupported
, if this query is not supported by thisDevice
GpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessible
Device Support
Supports Kepler or newer fully supported devices.
fn is_on_same_board_as(&self, other_device: &Device) -> Result<bool>
Checks if this Device
and the passed-in device are on the same physical board.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if eitherDevice
is invalidNotSupported
, if this check is not supported by thisDevice
GpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
fn reset_applications_clocks(&self) -> Result<()>
Resets the application clock to the default value.
This is the applications clock that will be used after a system reboot or a driver
reload. The default value is a constant, but the current value be changed with
.set_applications_clocks()
.
On Pascal and newer hardware, if clocks were previously locked with
.set_applications_clocks()
, this call will unlock clocks. This returns clocks
to their default behavior of automatically boosting above base clocks as
thermal limits allow.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalidNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi and newer non-GeForce fully supported devices and Maxwell or newer GeForce devices.
fn set_auto_boosted_clocks(&mut self, enabled: bool) -> Result<()>
Try to set the current state of auto boosted clocks on this Device
.
Auto boosted clocks are enabled by default on some hardware, allowing the GPU to run as fast as thermals will allow it to. Auto boosted clocks should be disabled if fixed clock rates are desired.
On Pascal and newer hardware, auto boosted clocks are controlled through application
clocks. Use .set_applications_clocks()
and .reset_applications_clocks()
to control
auto boost behavior.
Non-root users may use this API by default, but access can be restricted by root using
.set_api_restriction()
.
Note: persistence mode is required to modify the curent auto boost settings and therefore must be enabled.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalidNotSupported
, if thisDevice
does not support auto boosted clocksGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Not sure why nothing is said about NoPermission
.
Device Support
Supports Kepler and newer fully supported devices.
fn set_auto_boosted_clocks_default(&mut self, enabled: bool) -> Result<()>
Try to set the default state of auto boosted clocks on this Device
.
This is the default state that auto boosted clocks will return to when no compute processes (e.g. CUDA application with an active context) are running.
Requires root/admin permissions.
Auto boosted clocks are enabled by default on some hardware, allowing the GPU to run as fast as thermals will allow it to. Auto boosted clocks should be disabled if fixed clock rates are desired.
On Pascal and newer hardware, auto boosted clocks are controlled through application
clocks. Use .set_applications_clocks()
and .reset_applications_clocks()
to control
auto boost behavior.
Errors
Uninitialized
, if the library has not been successfully initializedNoPermission
, if the calling user does not have permission to change the default stateInvalidArg
, if theDevice
is invalidNotSupported
, if thisDevice
does not support auto boosted clocksGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler or newer non-GeForce fully supported devices and Maxwell or newer GeForce devices.
fn validate_info_rom(&self) -> Result<()>
Reads the infoROM from this Device
's flash and verifies the checksum.
Errors
Uninitialized
, if the library has not been successfully initializedCorruptedInfoROM
, if thisDevice
's infoROM is corruptedNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Not sure why InvalidArg
is not mentioned.
Device Support
Supports all devices with an infoROM.
fn clear_accounting_pids(&self) -> Result<()>
Clears accounting information about all processes that have already terminated.
Requires root/admin permissions.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalidNotSupported
, if thisDevice
does not support this featureNoPermission
, if the user doesn't have permission to perform this operationUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices.
fn accounting_buffer_size(&self) -> Result<u32>
Gets the number of processes that the circular buffer with accounting PIDs can hold (in number of elements).
This is the max number of processes that accounting information will be stored for before the oldest process information will get overwritten by information about new processes.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalidNotSupported
, if thisDevice
does not support this feature or accounting mode is disabledUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices.
fn is_accounting_enabled(&self) -> Result<bool>
Gets whether or not per-process accounting mode is enabled.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalidNotSupported
, if thisDevice
does not support this featureUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices.
fn accounting_pids(&self) -> Result<Vec<u32>>
Gets the list of processes that can be queried for accounting stats.
The list of processes returned can be in running or terminated state. Note that in the case of a PID collision some processes might not be accessible before the circular buffer is full.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalidNotSupported
, if thisDevice
does not support this feature or accounting mode is disabledUnknown
, on any unexpected error
fn accounting_stats_for(&self, process_id: u32) -> Result<AccountingStats>
Gets a process's accounting stats.
Accounting stats capture GPU utilization and other statistics across the lifetime
of a process. Accounting stats can be queried during the lifetime of the process
and after its termination. The time
field in AccountingStats
is reported as
zero during the lifetime of the process and updated to the actual running time
after its termination.
Accounting stats are kept in a circular buffer; newly created processes overwrite information regarding old processes.
Note:
* Accounting mode needs to be on. See .is_accounting_enabled()
.
* Only compute and graphics applications stats can be queried. Monitoring
applications can't be queried since they don't contribute to GPU utilization.
* If a PID collision occurs, the stats of the latest process (the one that
terminated last) will be reported.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalidNotFound
, if the process stats were not foundNotSupported
, if thisDevice
does not support this feature or accounting mode is disabledUnknown
, on any unexpected error
Device Support
Suports Kepler and newer fully supported devices.
Warning
On Kepler devices, per-process stats are accurate only if there's one process
running on this Device
.
fn set_accounting(&mut self, enabled: bool) -> Result<()>
Enables or disables per-process accounting.
Requires root/admin permissions.
Note: * This setting is not persistent and will default to disabled after the driver unloads. Enable persistence mode to be sure the setting doesn't switch off to disabled. * Enabling accounting mode has no negative impact on GPU performance. * Disabling accounting clears accounting information for all PIDs
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalidNotSupported
, if thisDevice
does not support this featureNoPermission
, if the user doesn't have permission to perform this operationUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices.
fn clear_ecc_error_counts(&self, counter_type: EccCounter) -> Result<()>
Clears the ECC error and other memory error counts for this Device
.
Sets all of the specified ECC counters to 0, including both detailed and total counts. This operation takes effect immediately.
Requires root/admin permissions and ECC mode to be enabled.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalid orcounter_type
is invalid (shouldn't occur?)NotSupported
, if thisDevice
does not support this featureNoPermission
, if the user doesn't have permission to perform this operationGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices. Only applicable to devices with
ECC. Requires InfoRom::ECC
version 2.0 or higher to clear aggregate
location-based ECC counts. Requires InfoRom::ECC
version 1.0 or higher to
clear all other ECC counts.
fn set_api_restricted(&mut self, api_type: Api, restricted: bool) -> Result<()>
Changes the root/admin restrictions on certain APIs.
This method can be used by a root/admin user to give non root/admin users access
to certain otherwise-restricted APIs. The new setting lasts for the lifetime of
the NVIDIA driver; it is not persistent. See .is_api_restricted()
to query
current settings.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalid orapi_type
is invalid (shouldn't occur?)NotSupported
, if thisDevice
does not support changing API restrictions or thisDevice
does not support the feature that API restrictions are being set for (e.g. enabling/disabling auto boosted clocks is not supported by thisDevice
).NoPermission
, if the user doesn't have permission to perform this operationGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices.
fn set_applications_clocks(
&mut self,
mem_clock: u32,
graphics_clock: u32
) -> Result<()>
&mut self,
mem_clock: u32,
graphics_clock: u32
) -> Result<()>
Sets clocks that applications will lock to.
Sets the clocks that compute and graphics applications will be running at. e.g. CUDA driver requests these clocks during context creation which means this property defines clocks at which CUDA applications will be running unless some overspec event occurs (e.g. over power, over thermal or external HW brake).
Can be used as a setting to request constant performance. Requires root/admin permissions.
On Pascal and newer hardware, this will automatically disable automatic boosting
of clocks. On K80 and newer Kepler and Maxwell GPUs, users desiring fixed performance
should also call .set_auto_boosted_clocks(false)
to prevent clocks from automatically
boosting above the clock value being set here.
Note that after a system reboot or driver reload applications clocks go back to their default value.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalid or the clocks are not a valid comboNotSupported
, if thisDevice
does not support this featureNoPermission
, if the user doesn't have permission to perform this operationGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler and newer non-GeForce fully supported devices and Maxwell or newer GeForce devices.
fn set_compute_mode(&mut self, mode: ComputeMode) -> Result<()>
Sets the compute mode for this Device
.
The compute mode determines whether a GPU can be used for compute operations and whether it can be shared across contexts.
This operation takes effect immediately. Under Linux it is not persistent
across reboots and always resets to Default
. Under Windows it is
persistent.
Under Windows, compute mode may only be set to Default
when running in WDDM
(physical display connected).
Requires root/admin permissions.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalid ormode
is invalid (shouldn't occur?)NotSupported
, if thisDevice
does not support this featureNoPermission
, if the user doesn't have permission to perform this operationGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
fn set_driver_model(
&mut self,
model: DriverModel,
flags: Behavior
) -> Result<()>
&mut self,
model: DriverModel,
flags: Behavior
) -> Result<()>
Sets the driver model for this Device
.
This operation takes effect after the next reboot. The model may only be set to WDDM when running in DEFAULT compute mode. Changing the model to WDDM is not supported then the GPU doesn't support graphics acceleration or will not support it after a reboot.
On Windows platforms the device driver can run in either WDDM or WDM (TCC) mode. If a physical display is attached to a device it must run in WDDM mode.
It is possible to force the change to WDM (TCC) while the display is still
attached with a Behavior
of FORCE
. This should only be done if the host
is subsequently powered down and the display is detached from this Device
before the next reboot.
Requires root/admin permissions.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalid ormodel
is invalid (shouldn't occur?)NotSupported
, if thisDevice
does not support this featureNoPermission
, if the user doesn't have permission to perform this operationGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Fermi and newer fully supported devices.
Platform Support
Only supports Windows.
Examples
use nvml_wrapper::bitmasks::*; use nvml_wrapper::enum_wrappers::device::DriverModel; device.set_driver_model(DriverModel::WDM, DEFAULT)?; // Force the change to WDM (TCC) device.set_driver_model(DriverModel::WDM, FORCE)?;
fn set_ecc(&mut self, enabled: bool) -> Result<()>
Set whether or not ECC mode is enabled for this Device
.
Requires root/admin permissions. Only applicable to devices with ECC.
This operation takes effect after the next reboot.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalidNotSupported
, if thisDevice
does not support this featureNoPermission
, if the user doesn't have permission to perform this operationGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports Kepler and newer fully supported devices. Requires InfoRom::ECC
version
1.0 or higher.
fn set_gpu_op_mode(&mut self, mode: OperationMode) -> Result<()>
Sets the GPU operation mode for this Device
.
Requires root/admin permissions. Changing GOMs requires a reboot, a requirement that may be removed in the future.
Compute only GOMs don't support graphics acceleration. Under Windows switching to these GOMs when the pending driver model is WDDM (physical display attached) is not supported.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalid ormode
is invalid (shouldn't occur?)NotSupported
, if thisDevice
does not support GOMs or a specific modeNoPermission
, if the user doesn't have permission to perform this operationGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
Device Support
Supports GK110 M-class and X-class Tesla products from the Kepler family. Modes
LowDP
and AllOn
are supported on fully supported GeForce products. Not
supported on Quadro and Tesla C-class products.
fn set_power_management_limit(&mut self, limit: u32) -> Result<()>
Sets the power limit for this Device
, in milliwatts.
This limit is not persistent across reboots or driver unloads. Enable
persistent mode to prevent the driver from unloading when no application
is using this Device
.
Requires root/admin permissions. See .power_management_limit_constraints()
to check the allowed range of values.
Errors
Uninitialized
, if the library has not been successfully initializedInvalidArg
, if theDevice
is invalid orlimit
is out of rangeNotSupported
, if thisDevice
does not support this featureGpuLost
, if thisDevice
has fallen off the bus or is otherwise inaccessibleUnknown
, on any unexpected error
For some reason NVIDIA does not mention NoPermission
.
Device Support
Supports Kepler and newer fully supported devices.
fn into_raw(self) -> nvmlDevice_t
Consume the struct and obtain the raw device handle that it contains.
fn as_raw(&self) -> &nvmlDevice_t
Obtain a reference to the raw device handle contained in the struct.
fn as_mut_raw(&mut self) -> &mut nvmlDevice_t
Obtain a mutable reference to the raw device handle contained in the struct.
unsafe fn unsafe_raw(&self) -> nvmlDevice_t
Sometimes necessary for C interop. Use carefully.
Trait Implementations
impl<'nvml> Debug for Device<'nvml>
[src]
impl<'nvml> Send for Device<'nvml>
[src]
impl<'nvml> Sync for Device<'nvml>
[src]
impl<'nvml> From<nvmlDevice_t> for Device<'nvml>
[src]
fn from(device: nvmlDevice_t) -> Self
Performs the conversion.