Bookmarks

MIG — GPU partitioning

Multi-Instance GPU

An NVIDIA technology that splits a single GPU into several isolated instances, each with its own memory, cache and compute cores; up to seven instances per GPU.

Also: MIG instance, MIG profile, MIG mode

checked 9 Nov

All terms

MIG runs on NVIDIA accelerators built on the Ampere architecture — the A100 and A30 were the first to support it. The technology targets multi-tenant clusters: several users and teams share one expensive accelerator without interfering with one another or claiming the whole card for a small task.

How an instance is structured

The GPU is divided into eight memory slices and seven compute slices — streaming multiprocessors (SMs). A profile sets the instance size: a name such as 3g.40gb means three SM slices and 40 GB of memory.

What the instance getsWhat it provides
Memorya dedicated share of capacity and bandwidth, guaranteed at the hardware level
Cache and controllersits own L2 cache bank and paths to memory — neighbouring jobs cannot occupy them
SM slicesdedicated compute cores: performance does not depend on the neighbours’ load
Media enginesNVDEC decoders — the number depends on the profile

Profile mixes must add up to whole slices: on an A100 40 GB you can deploy seven 1g.5gb instances, or two 3g.20gb, or one 2g.10gb and five 1g.5gb. On an H100 80 GB the maximum split is seven 1g.10gb instances with 10 GB each, while the 7g.80gb profile takes the entire GPU.

How to enable and use

bashon the host
# enable MIG mode (an A100 needs a GPU reset)sudo nvidia-smi -i 0 -mig 1# two 20 GB instances on an A100 40 GBsudo nvidia-smi mig -cgi 9,3g.20gb -C# hand one instance to an application by UUIDCUDA_VISIBLE_DEVICES=MIG-c7384736-a75d-5afc-978f-d2f1294409fd ./app

Each instance appears to an application as a separate CUDA device with its own UUID. Instances do not survive a reboot: the geometry is kept in the mig-parted configuration and applied when the node starts. In Kubernetes, instances are handed to pods as separate resources through the device plugin.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • GPUgraphics processing unit

    A GPU is one whole graphics processor; MIG splits it into several isolated instances with guaranteed memory.

In depth in the references

where the topic is covered in detail