Skip to main content
Version: Next

Allocate device memory to container

Allocate a part of device memory by specifying resource mthreads.com/sgpu-memory. Optional. Each unit equals 512 MiB. Use a plain integer without suffixes such as Mi, Gi, or G; the value is a count of memory units, not a percentage.

resources:
limits:
mthreads.com/vgpu: 1 # requesting 1 GPU
mthreads.com/sgpu-memory: 32 # Allocate 32 x 512 MiB = 16 GiB

The maximum and the valid values depend on the card model:

Card modelDevice memoryValid sgpu-memory values
MTT S400048 GiB2, 4, 8, 16, 32, 64, 96
MTT S500080 GiB2, 4, 8, 16, 32, 64, 128, 160

Values outside the list are rejected at admission. On MTT S5000 clusters, set devices.mthreads.memoryPerCard to [160] when installing HAMi. See Enable Mthreads GPU sharing for details.

CNCFHAMi is a CNCF Incubating project