pub struct VgpuType(/* private fields */);Implementations§
Source§impl VgpuType
impl VgpuType
pub const fn from_id(id: VgpuTypeId) -> Self
pub const fn id(self) -> VgpuTypeId
Sourcepub fn class(self) -> Result<String>
pub fn class(self) -> Result<String>
Returns the class of a vGPU type. It does not exceed 64 bytes including the terminating NUL byte. This wrapper allocates the required NVML buffer internally.
For Kepler or newer fully supported devices.
§Errors
Returns an error if the internal class-name buffer is too small, if NVML rejects the vGPU type ID or query arguments, or if NVML reports an unexpected failure.
Sourcepub fn name(self) -> Result<String>
pub fn name(self) -> Result<String>
Returns the vGPU type name.
The name is an alphanumeric vGPU identifier such as GRID M60-2Q.
It does not exceed 64 bytes including the terminating NUL byte.
This wrapper allocates the required NVML buffer internally.
For Kepler or newer fully supported devices.
§Errors
Returns an error if the internal name buffer is too small, if NVML rejects the vGPU type ID or query arguments, or if NVML reports an unexpected failure.
Sourcepub fn gpu_instance_profile_id(self) -> Result<u32>
pub fn gpu_instance_profile_id(self) -> Result<u32>
Returns the GPU instance profile ID for this vGPU type ID.
Returns a valid GPU instance profile ID for MIG-capable vGPU types, or
INVALID_GPU_INSTANCE_PROFILE_ID otherwise.
For Kepler or newer fully supported devices.
§Errors
Returns an error if NVML rejects the vGPU type ID or query arguments, if the device is not in vGPU host virtualization mode, or if NVML reports an unexpected failure.
Sourcepub fn device_id(self) -> Result<VgpuTypeDeviceId>
pub fn device_id(self) -> Result<VgpuTypeDeviceId>
Returns the device ID of a vGPU type.
For Kepler or newer fully supported devices.
§Errors
Returns an error if NVML rejects the vGPU type ID or query arguments, if NVML has not been initialized, or if NVML reports an unexpected failure.
Sourcepub fn framebuffer_size(self) -> Result<u64>
pub fn framebuffer_size(self) -> Result<u64>
Returns the vGPU framebuffer size in bytes.
For Kepler or newer fully supported devices.
§Errors
Returns an error if NVML rejects the vGPU type ID or query arguments, if NVML has not been initialized, or if NVML reports an unexpected failure.
Sourcepub fn num_display_heads(self) -> Result<u32>
pub fn num_display_heads(self) -> Result<u32>
Returns count of vGPU’s supported display heads.
For Kepler or newer fully supported devices.
§Errors
Returns an error if NVML rejects the vGPU type ID or query arguments, if NVML has not been initialized, or if NVML reports an unexpected failure.
Sourcepub fn resolution(self, display_index: u32) -> Result<VgpuTypeResolution>
pub fn resolution(self, display_index: u32) -> Result<VgpuTypeResolution>
Returns vGPU display head’s maximum supported resolution.
For Kepler or newer fully supported devices.
§Errors
Returns an error if NVML rejects the vGPU type ID or query arguments, if NVML has not been initialized, or if NVML reports an unexpected failure.
Sourcepub fn license(self) -> Result<String>
pub fn license(self) -> Result<String>
Returns 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 license type, the licenses are
delimited by semicolons, for example
GRID-Virtual-PC,2.0;GRID-Virtual-WS,2.0;GRID-Virtual-WS-Ext,2.0.
The returned string does not exceed 128 bytes including the terminating NUL byte. This wrapper allocates the required NVML buffer internally.
For Kepler or newer fully supported devices.
§Errors
Returns an error if the internal license buffer is too small, if NVML rejects the vGPU type ID or query arguments, if NVML has not been initialized, or if NVML reports an unexpected failure.
Sourcepub fn frame_rate_limit(self) -> Result<u32>
pub fn frame_rate_limit(self) -> Result<u32>
Returns the static frame-rate limit value of the vGPU type.
For Kepler or newer fully supported devices.
§Errors
Returns an error if NVML rejects the vGPU type ID or query arguments, if the frame-rate limiter is disabled for this vGPU type, if NVML has not been initialized, or if NVML reports an unexpected failure.
Sourcepub fn max_instances(self, device: Device) -> Result<u32>
pub fn max_instances(self, device: Device) -> Result<u32>
Returns the maximum number of vGPU instances creatable on a device for this vGPU type.
For Kepler or newer fully supported devices.
§Errors
Returns an error if NVML rejects the vGPU type ID or query arguments, if NVML has not been initialized, or if NVML reports an unexpected failure.
Sourcepub fn max_instances_per_vm(self) -> Result<u32>
pub fn max_instances_per_vm(self) -> Result<u32>
Returns the maximum number of vGPU instances supported per VM for this vGPU type.
For Kepler or newer fully supported devices.
§Errors
Returns an error if NVML rejects the vGPU type ID or query arguments, if NVML has not been initialized, or if NVML reports an unexpected failure.
Sourcepub fn max_instances_per_gpu_instance(self) -> Result<u32>
pub fn max_instances_per_gpu_instance(self) -> Result<u32>
Returns the maximum number of vGPU instances per GPU instance for this vGPU type.
§Errors
Returns an error if NVML rejects the versioned request, if the vGPU type ID or query arguments are invalid, if the host, GPU, or vGPU type does not support the query, if NVML has not been initialized, or if NVML reports an unexpected failure.
Sourcepub fn bar1_info(self) -> Result<VgpuTypeBar1Info>
pub fn bar1_info(self) -> Result<VgpuTypeBar1Info>
Returns the BAR1 info for this vGPU type.
For Maxwell or newer fully supported devices.
§Errors
Returns an error if NVML rejects the vGPU type ID or query arguments, if NVML has not been initialized, or if NVML reports an unexpected failure.
Sourcepub fn capability(self, capability: VgpuTypeCapability) -> Result<bool>
pub fn capability(self, capability: VgpuTypeCapability) -> Result<bool>
Returns the requested capability for the given vGPU type.
See VgpuTypeCapability for the supported capabilities.
Returns a boolean indicating whether the capability is supported.
For Maxwell or newer fully supported devices.
§Errors
Returns an error if NVML rejects the vGPU type ID, capability, or query arguments, if NVML has not been initialized, or if NVML reports an unexpected failure.
Sourcepub fn fb_reservation(self) -> Result<u64>
pub fn fb_reservation(self) -> Result<u64>
Returns the static framebuffer reservation of the vGPU type in bytes.
§Errors
Returns an error if NVML rejects the vGPU type ID or query arguments, if NVML has not been initialized, or if NVML reports an unexpected failure.
Sourcepub fn gsp_heap_size(self) -> Result<u64>
pub fn gsp_heap_size(self) -> Result<u64>
Returns the static GSP heap size of the vGPU type in bytes.
§Errors
Returns an error if NVML rejects the vGPU type ID or query arguments, if NVML has not been initialized, or if NVML reports an unexpected failure.