Enable MIG on NVIDIA A100

Praveenpm
techbeatly
Published in
3 min readMay 31, 2023

This article will help you to configure and enable the MIG on NVIDIA A100 Ubuntu 22.4.

Compatibility check

  • By running the below command, we can verify, model name of the GPU and compatibility.
lspci | grep -EA1 -i "VGA|3D controller"

Special Note: This will list all of the PCI devices that have a VGA or 3D controller function. If your GPU is listed, then it supports passthrough. For example, the output of the command might look like this: Eg: 01:00.0 VGA compatible controller: <GPU name will be listed>

Some documentation talks about IOMMU, it’s also known as VT-d, is a feature of AMD processors that allows the operating system to manage direct access to hardware devices. This can be useful for virtualization, as it allows the hypervisor to isolate guest operating systems from each other and from the host operating system.

  • Check in the installed GPU in the system using the below command
lshw -c video
  • Check the installed GPU card driver version using the below command.
nvidia-smi

Driver check and update.

Check the driver is compatible or not.

Enable and configure MIG mode

  • Check the MIG Mode is enabled of Disabled
sudo nvidia-smi -i 0 -mig 1
  • List down the GPU instances profiles using the below command
sudo nvidia-smi mig -lgip

User must create GPU instances using the -cgi command in order to add to the pool.

  • Get the profile ID first using the below command
sudo nvidia-smi mig -lgipp
  • Using the below command convert the GPU to 7 GPU instances. (Run 4 times as each iteration create 2 GPU instances)
sudo nvidia-smi mig -cgi 19,1g.5gb -C
  • Validate MIG devices using the below commands
sudo nvidia-smi mig -lgi
nvidia-smi
  • List out the connected GPUs using the below command
nvidia-smi -L
  • List the compute instance using the below command
nvidia-smi mig -i 0 -lgi

--

--

Praveenpm
techbeatly

Technology Lead for Hewlett Packard Enterprise