Version: Next
Enable Enflame GCU Sharing
Introduction
HAMi now supports Enflame DRS hard partition scheduling, aligned with Enflame native scheduler behavior.
DRS is a hard-slice mode similar to NVIDIA MIG and Ascend VNPU templates.
Prerequisites
- Enflame gcushare-device-plugin >= 2.2.14 (please consult your device provider; only
gcushare-device-pluginis needed — do not installgcushare-scheduler-plugin) - driver version >= 1.8.7
- kubernetes >= 1.24
- enflame-container-toolkit >= 2.0.50
Enable Enflame DRS Scheduling
- Deploy
gcushare-device-pluginon Enflame nodes (please consult your device provider to acquire its package and documentation)
caution
Install only gcushare-device-plugin. Do not install the gcushare-scheduler-plugin package.
- Set
devices.enflame.enabled=truewhen deploying HAMi
helm install hami hami-charts/hami --set devices.enflame.enabled=true -n kube-system
note
The default resource names are:
enflame.com/drs-gcufor direct DRS slice requestsenflame.com/gcu-memoryfor memory requests (in MiB)enflame.com/gcu-corefor core requests (as a percentage)
You can customize these names by modifying the hami-scheduler-device ConfigMap.
Running DRS Workloads
HAMi supports two request styles:
- Direct DRS slice request (
enflame.com/drs-gcu) - Unified memory/core request (
enflame.com/gcu-memory+enflame.com/gcu-core); HAMi converts it to a DRS profile internally.
Direct DRS slice request
apiVersion: v1
kind: Pod
metadata:
name: gcushare-pod-drs
namespace: kube-system
spec:
terminationGracePeriodSeconds: 0
containers:
- name: pod-gcu-example1
image: ubuntu:22.04
imagePullPolicy: IfNotPresent
command: ["sleep"]
args: ["100000"]
resources:
limits:
enflame.com/drs-gcu: 3
requests:
enflame.com/drs-gcu: 3
Request by memory/core (recommended unified API)
apiVersion: v1
kind: Pod
metadata:
name: gcushare-pod-by-spec
namespace: kube-system
spec:
terminationGracePeriodSeconds: 0
containers:
- name: pod-gcu-example1
image: ubuntu:22.04
imagePullPolicy: IfNotPresent
command: ["sleep"]
args: ["100000"]
resources:
limits:
enflame.com/gcu-memory: 20480 # MiB
enflame.com/gcu-core: 40 # percent
requests:
enflame.com/gcu-memory: 20480
enflame.com/gcu-core: 40
tip
More examples are available in the examples/enflame folder.
Scheduling Annotations
During scheduling, HAMi writes DRS-compatible annotations such as:
assigned-containersenflame.com/gcu-assignedenflame.com/gcu-assigned-indexenflame.com/gcu-assigned-minorenflame.com/gcu-request-size
These annotations are consumed by the Enflame device plugin during the Allocate phase.