You can partition an NVIDIA A100 GPU into up to seven separate GPU instances without security risks. This way, the GPU can provide separate GPU resources for different users. This improves the utilization of GPU resources. This topic describes how to use a node pool to enable the Multi-Instance GPU (MIG) feature for nodes equipped with NVIDIA A100 GPUs.
Prerequisites
- A Kubernetes cluster for heterogeneous computing is created. The cluster must use
Kubernetes 1.20.4 or later. For more information, see Create a Kubernetes cluster for heterogeneous computing.
Notice Only Elastic Compute Service (ECS) bare metal instances that are equipped with NVIDIA A100 GPUs support the MIG feature. These instances belong to the instance types whose names start with ecs.ebmgn7.. ECS bare metal instances that are equipped with NVIDIA A100 GPUs and also use GPU passthrough do not support the MIG feature. These instances belong to the instance types whose names start with ecs.gn7.. For more information about ECS bare metal instances, see Overview.
- A kubectl client is connected to the cluster. For more information, see Connect to ACK clusters by using kubectl.
Background information
At GPU Technology Conference (GTC) 2020, NVIDIA released the Tesla A100 GPU that is based on the Ampere architecture. The Ampere architecture is the next-generation architecture that inherits the benefits of the previous Volta and Turing architectures. The Ampere architecture also provides new features, including MIG.
[compute]g.[memory]gb
. For example, the specification of a GPU instance with one compute unit and one memory
unit is 1g.5gb. The following table describes the specifications and numbers of different
MIG instances that can be partitioned from an NVIDIA A100 GPU.
Specification | Specification ID | Maximum number of instances available | Number of compute units per instance | Number of memory units per instance |
---|---|---|---|---|
1g.5gb | 19 | 7 | 1 | 1 (5 GB) |
2g.10gb | 14 | 3 | 2 | 2 (10 GB) |
3g.20gb | 9 | 2 | 3 | 4 (20 GB) |
4g.20gb | 5 | 1 | 4 | 4 (20 GB) |
7g.40gb | 0 | 1 | 7 | 8 (40 GB) |
Use node pool labels to partition a GPU
- Specify a MIG instance specification or a MIG specification ID
This method allows you to partition an NVIDIA A100 GPU into multiple MIG instances of the same specification.
- Specify a sequence of MIG instance specifications
This method allows you to partition an NVIDIA A100 GPU into multiple MIG instances of different specifications.
Method 1: Specify a MIG instance specification or a MIG specification ID
- Add a label with the following key to the node pool:
ack.aliyun.com/gpu-partition-size
. - Set the value of the label to a MIG instance specification or a MIG specification ID, for example, 1g.5gb or 19.
- Example:
ack.aliyun.com/gpu-partition-size=1g.5gb
orack.aliyun.com/gpu-partition-size=19
. - Description: Each NVIDIA A100 GPU is partitioned into as many MIG instances of the specified specification as possible. The preceding table shows that an NVIDIA A100 GPU can be partitioned into up to 7 MIG instances of the 1g.5gb specification.

Method 2: Specify a sequence of MIG instance specifications
- Add a label with the following key to the node pool:
ack.aliyun.com/gpu-partition-sequence
. - Set the value of the label to a sequence of MIG instance specifications or MIG specification
IDs, for example, 1g.5gb-2g.10gb-3g.20gb or 19-14-9. However, only a few particular
sequences are supported.
NVIDIA A100 GPUs support 18 sequences. For more information, see the "A100 Supported Profiles" section of the NVIDIA A100 Multi-Instance GPU User Guide.
Container Service for Kubernetes (ACK) supports only the following sequences.Sequence of MIG specification IDs Sequence of MIG specifications 19-19-19-19-19-19-19 1g.5gb-1g.5gb-1g.5gb-1g.5gb-1g.5gb-1g.5gb-1g.5gb 14-14-14-19 2g.10gb-2g.10gb-2g.10gb-1g.5gb 9-9 3g.20gb-3g.20gb 5-19-19-19 4g.20gb-1g.5gb-1g.5gb-1g.5gb - Example:
ack.aliyun.com/gpu-partition-sequence=3g.20gb-3g.20gb
orack.aliyun.com/gpu-partition-sequence=9-9
. - Description: Each NVIDIA A100 GPU is partitioned into MIG instances of the specifications
specified in the sequence. For example, a sequence of 3g.20gb-3g.20gb specifies that
an NVIDIA A100 GPU is partitioned into two MIG instances of the 3g.20gb specification.
Notice Commas (,) are not supported when you specify the value of a label in the ACK console. Separate multiple MIG specifications or MIG specification IDs with hyphens (-). For example, the
ack.aliyun.com/gpu-partition-sequence=1g.5gb,2g.10gb,3g.20gb
label is invalid. The valid format isack.aliyun.com/gpu-partition-sequence=1g.5gb-2g.10gb-3g.20gb
.

Create a node pool
Verify that MIG is enabled for nodes in the node pool
After the node pool is created, perform the following steps to verify that the MIG feature is enabled for nodes in the node pool.