<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 17 janv. 2023 à 12:22, Dmitriy Rabotyagov <<a href="mailto:noonedeadpunk@gmail.com">noonedeadpunk@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Oh, wait a second, can you have multiple different types on 1 GPU? As<br>
I don't think you can, or maybe it's limited to MIG mode only - I'm<br>
using mostly vGPUs so not 100% sure about MIG mode.<br>
But eventually on vGPU, once you create 1 type, all others become<br>
unavailable. So originally each comand like<br>
# cat /sys/bus/pci/devices/0000\:84\:00.1/mdev_supported_types/nvidia-699/available_instances<br>
1<br>
# cat /sys/bus/pci/devices/0000\:84\:00.2/mdev_supported_types/nvidia-699/available_instances<br>
1<br>
# cat /sys/bus/pci/devices/0000\:84\:00.2/mdev_supported_types/nvidia-700/available_instances<br>
1<br>
<br>
BUT, once you create an mdev of specific type, rest will not report as<br>
available anymore.<br>
# echo ${uuidgen} ><br>
/sys/bus/pci/devices/0000\:84\:00.1/mdev_supported_types/nvidia-699/create<br>
# cat /sys/bus/pci/devices/0000\:84\:00.1/mdev_supported_types/nvidia-699/available_instances<br>
0<br>
# cat /sys/bus/pci/devices/0000\:84\:00.2/mdev_supported_types/nvidia-699/available_instances<br>
1<br>
# cat /sys/bus/pci/devices/0000\:84\:00.2/mdev_supported_types/nvidia-700/available_instances<br>
0<br>
<br>
Please, correct me if I'm wrong here and Nvidia did some changes with<br>
recent drivers or it's applicable only for vGPUs and it's not a case<br>
for the MIG mode.<br>
<br></blockquote><div><br></div><div>No, you're unfortunately right.</div><div><a href="https://docs.nvidia.com/grid/latest/grid-vgpu-user-guide/index.html#valid-vgpu-configurations-one-gpu">https://docs.nvidia.com/grid/latest/grid-vgpu-user-guide/index.html#valid-vgpu-configurations-one-gpu</a></div><div><br></div><div>For time-slices vGPUs, you need to use the same type for one pGPU. Of course, if a card has multiple pGPUs, you can have multiple types, one per PCI ID. Technically, nvidia says you need to use the same framebuffer size, but that eventually means the same.<br></div><div><br></div><div>For MIG-backed vGPUs, surely you can mix types after creating MIG instances.</div><div>-S<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
вт, 17 янв. 2023 г., 03:37 Alex Song (宋文平) <<a href="mailto:songwenping@inspur.com" target="_blank">songwenping@inspur.com</a>>:<br>
><br>
><br>
> Hi, Ulrich:<br>
><br>
> Sean is expert on VGPU management from nova side. I complete the usage steps if you are using Nova to manage MIGs for example:<br>
> 1. divide the A100(80G) GPUs to 1g.10gb*1+2g.20gb*1+3g.40gb*1(one 1g.10gb, one 2g.20gb and one 3g.40gb)<br>
> 2.add the device config in nova.conf:<br>
> [devices]<br>
> enabled_mdev_types = nvidia-699,nvidia-700,nvidia-701<br>
> [mdev_nvidia-699]<br>
> device_addresses = 0000:84:00.1<br>
> [mdev_nvidia-700]<br>
> device_addresses = 0000:84:00.2<br>
> [mdev_nvidia-701]<br>
> device_addresses = 0000:84:00.3<br>
> 3.config the flavor metadata with VGPU:1 and create vm use the flavor, the vm will randomly allocate one MIG from [1g.10gb,2g,20gb,3g.40gb]<br>
> On step 2, if you have 2 A100(80G) GPUs on one node to use MIG, and the other GPU divide to 1g.10gb*3+4g.40gb*1, the config maybe like this:<br>
> [devices]<br>
> enabled_mdev_types = nvidia-699,nvidia-700,nvidia-701,nvidia-702<br>
> [mdev_nvidia-699]<br>
> device_addresses = 0000:84:00.1, 0000:3b:00.1<br>
> [mdev_nvidia-700]<br>
> device_addresses = 0000:84:00.2<br>
> [mdev_nvidia-701]<br>
> device_addresses = 0000:84:00.3,<br>
> [mdev_nvidia-702]<br>
> device_addresses = 0000:3b:00.3<br>
><br>
> In our product, we use Cyborg to manage the MIGs, from the legacy style we also need config the mig like Nova, this is difficult to maintain, especially deploy openstack on k8s, so we remove these config and automatically discovery the MIGs and support divide MIG by cyborg api. By creating device profile with vgpu type traits(nvidia-699, nvidia-700), we can appoint MIG size to create VMs.<br>
><br>
> Kind regards<br>
><br>
<br>
</blockquote></div></div>