pub struct VgpuType<'dev> { /* private fields */ }Implementations§
Source§impl<'dev> VgpuType<'dev>
impl<'dev> VgpuType<'dev>
Sourcepub fn new(device: &'dev Device<'_>, id: nvmlVgpuTypeId_t) -> Self
pub fn new(device: &'dev Device<'_>, id: nvmlVgpuTypeId_t) -> Self
Create a new vGPU type wrapper.
You probably don’t need to use this yourself, but rather through
Device::vgpu_supported_types and Device::vgpu_creatable_types.
Sourcepub fn class_name(&self) -> Result<String, NvmlError>
pub fn class_name(&self) -> Result<String, NvmlError>
Sourcepub fn license(&self) -> Result<String, NvmlError>
pub fn license(&self) -> Result<String, NvmlError>
Retrieve license requirements for a vGPU type.
The license type and version required to run the specified vGPU type is returned as an alphanumeric string, in the form “<license name>,<version>”, for example “GRID-Virtual-PC,2.0”. If a vGPU is runnable with* more than one type of license, the licenses are delimited by a semicolon, for example “GRID-Virtual-PC,2.0;GRID-Virtual-WS,2.0;GRID-Virtual-WS-Ext,2.0”.
§Errors
Uninitialized, if the library has not been successfully initializedInsufficientSize, if the passed-insizeis 0 (must be > 0)InvalidArg, if thisDeviceis invalidUnknown, on any unexpected error
§Device support
Kepler or newer fully supported devices.
Sourcepub fn name(&self) -> Result<String, NvmlError>
pub fn name(&self) -> Result<String, NvmlError>
Retrieve the name of the vGPU type.
The name is an alphanumeric string that denotes a particular vGPU, e.g. GRID M60-2Q.
§Errors
Uninitialized, if the library has not been successfully initializedInvalidArg, if thisDeviceis invalidUnknown, on any unexpected error
§Device support
Kepler or newer fully supported devices.
Sourcepub fn capabilities(
&self,
capability: nvmlVgpuCapability_t,
) -> Result<bool, NvmlError>
pub fn capabilities( &self, capability: nvmlVgpuCapability_t, ) -> Result<bool, NvmlError>
Retrieve the requested capability for a given vGPU type. Refer to the
nvmlVgpuCapability_t structure for the specific capabilities that can be
queried.
§Errors
Uninitialized, if the library has not been successfully initializedInvalidArg, if thisDeviceis invalidUnknown, on any unexpected error
§Device Support
Maxwell or newer fully supported devices.
Sourcepub fn frame_rate_limit(&self) -> Result<u32, NvmlError>
pub fn frame_rate_limit(&self) -> Result<u32, NvmlError>
Retrieve the static frame rate limit value of the vGPU type.
§Errors
Uninitialized, if the library has not been successfully initializedNotSupported, if frame rate limiter is turned off for the vGPU typeInvalidArg, if thisDeviceis invalidUnknown, on any unexpected error
§Device Support
Kepler or newer fully supported devices.
Sourcepub fn framebuffer_size(&self) -> Result<u64, NvmlError>
pub fn framebuffer_size(&self) -> Result<u64, NvmlError>
Sourcepub fn instance_profile_id(&self) -> Result<u32, NvmlError>
pub fn instance_profile_id(&self) -> Result<u32, NvmlError>
Retrieve the GPU Instance Profile ID for the vGPU type. The API will return a valid GPU
Instance Profile ID for the MIG capable vGPU types, else
crate::ffi::bindings::INVALID_GPU_INSTANCE_PROFILE_ID is returned.
§Errors
Uninitialized, if the library has not been successfully initializedInvalidArg, if thisDeviceis invalidUnknown, on any unexpected error
§Device Support
Kepler or newer fully supported devices.
Sourcepub fn max_instances(&self) -> Result<u32, NvmlError>
pub fn max_instances(&self) -> Result<u32, NvmlError>
Sourcepub fn max_instances_per_vm(&self) -> Result<u32, NvmlError>
pub fn max_instances_per_vm(&self) -> Result<u32, NvmlError>
Sourcepub fn num_display_heads(&self) -> Result<u32, NvmlError>
pub fn num_display_heads(&self) -> Result<u32, NvmlError>
Sourcepub fn resolution(&self, display_head: u32) -> Result<(u32, u32), NvmlError>
pub fn resolution(&self, display_head: u32) -> Result<(u32, u32), NvmlError>
Retrieve vGPU display head’s maximum supported resolution.
The display_head argument specifies the 0-based display index, the
maximum being what VgpuType::num_display_heads returns.
§Errors
Uninitialized, if the library has not been successfully initializedInvalidArg, if thisDeviceis invalidUnknown, on any unexpected error
§Device Support
Kepler or newer fully supported devices.