Open PiotrProkop opened 2 months ago
@klueska did you had a chance to take a look at it? nvidia-smi
also provide vgpu type id as hex value, sample output from nvidia-smi vgpu -v -c
vGPU Type ID : 0x402
Name : NVIDIA GeForce GTX 1060
Class : Geforce
GPU Instance Profile ID : N/A
Max Instances : 2
Max Instances Per VM : 1
Multi vGPU Exclusive : False
vGPU Exclusive Type : False
vGPU Exclusive Size : False
Device ID : 0x1e3710de
Sub System ID : 0x1e37180d
FB Memory : 8192 MiB
BAR1 size : 256 MB
Display Heads : 1
Maximum X Resolution : 7680
Maximum Y Resolution : 4320
Frame Rate Limit : N/A
Placement Size : N/A
Creatable Placement IDs : N/A
GRID License : GRID-vGaming,8.0
where x402
is 1026
in decimal and you can use it to create vgpus on the host by running:
echo $(uuidgen) > /sys/bus/pci/devices/<gpu_pci>/mdev_supported_types/nvidia-1026/create
This PR adds new
VgpuTypeIdToUint32
helper function that allows to retrieve underlyinguint32
representation ofnvmlVgpuTypeId
:this makes it easier to programmatically create vgpus , for example:
where
<typeID>
is this underlyinguint32
.In previous versions of
go-nvml
I could just do type conversion touint32
directly asdevice.GetSupportedVgpus()
was returning:instead of Interface.