Device allocation¶
Goal: each Pod receives its NPUs and RoCE NICs together from one NUMA node. The reference configuration uses 4 NPUs and 2 NICs per Pod. In Dynamic Resource Allocation (DRA) mode, the ResourceClaimTemplate (RCT) that you apply sets the NPU count and the NIC count.
The RCT is a namespaced resource, so first create the namespace the stack uses. You also create the Secrets and the model store of Cluster foundation in this namespace.
The reference configuration allocates the NPUs and RoCE NICs through DRA, because an RCT can require the NPUs and NICs to come from the same NUMA node. For the comparison with a device plugin, see Coding Assistant on Rebel100™ › Design alternatives.
For the general DRA concepts and API, see the Kubernetes documentation on Dynamic Resource Allocation. This page covers only the DRA-related Kubernetes resources this stack uses and who creates each.
The scheduler reads the following resources to allocate devices to a Pod. If the DeviceClass, the ResourceSlice, or the RCT is missing, the Pod stays Pending. The chart writes the Pod's spec.resourceClaims at install time. Kubernetes creates a ResourceClaim for each Pod from the RCT, and the scheduler records the allocated devices in that ResourceClaim.
| Layer | Resource | Created by | When |
|---|---|---|---|
| 1 | DeviceClass (npu.rebellions.ai, dranet) | RBLN NPU Operator, dranet | Node preparation |
| 2 | ResourceSlice (per-node device list) | RBLN NPU Operator, dranet | Node preparation |
| 3 | ResourceClaimTemplate npu-rdma (the workload's request) | You | Before installing |
| 4 | The Pod's spec.resourceClaims (the Pod's reference to the RCT) | The chart, at helm install | Installation |
The reference configuration allocates NPUs and RoCE NICs from the same NUMA node to each Pod, so that the KV transfer does not cross NUMA nodes. The matchAttribute: resource.kubernetes.io/numaNode constraint of the numa-aligned RCT implements this same-NUMA allocation. A server node in the reference architecture has two NUMA nodes with 4 NPUs each. Therefore, at most two Pods that use 4 NPUs each run on one server node.
ResourceClaimTemplate for npu-rdma¶
You create this resource. The chart does not create the RCT. The chart references the RCT only by name (devices.claimTemplateName).
The reference configuration uses the chart's examples/manifests/rct/numa-aligned.yaml. numa-aligned.yaml requests 4 NPUs and 2 NICs per Pod from the same NUMA node. numa-aligned.yaml also requires the two NICs to be on different physical NICs, that is, to have different resource.kubernetes.io/pcieRoot values. Both the RBLN NPU DRA driver and dranet (v1.5.0 or later) must advertise resource.kubernetes.io/numaNode. dranet must also advertise resource.kubernetes.io/pcieRoot. On Kubernetes 1.34 and 1.35, enable the DRAConsumableCapacity feature gate on kube-apiserver, kube-scheduler, and kubelet.
On a cluster that differs from the reference configuration, apply or edit the RCT as follows.
- A driver does not advertise
resource.kubernetes.io/numaNode, or dranet does not advertiseresource.kubernetes.io/pcieRoot:examples/manifests/rct/numa-unaligned.yaml. - An AGG install without NICs:
examples/manifests/rct/npu-only.yaml. Also setdevices.rdma.enabled=falseanddevices.claimTemplateName=npu-only. - A model that has a recipe in the chart: the recipe's
examples/models/<model>/rct-*.yaml. - Backend NICs other than the Broadcom NICs of the reference node: change the
pciSubsystem == "9140"term in the RCT's NIC selector to match your NICs, or remove the term.
Device allocation checks¶
Check that the scheduler can allocate the devices that the RCT requests. Check item (5) before installing (see Item (5) attribute cross-check).
| # | What to check | Expected |
|---|---|---|
| 1 | Both DeviceClasses exist | npu.rebellions.ai and dranet are listed |
| 2 | Each NPU node has a ResourceSlice from each driver | Every NPU node has a ResourceSlice whose driver is npu.rebellions.ai (NPU devices) and one whose driver is dra.net (NIC devices) |
| 3 | The RCT npu-rdma exists in the stack's namespace | npu-rdma is listed |
| 4 | The ResourceClaims of the prefill and decode Pods are allocated (after the stack is installed) | The STATE of each ResourceClaim includes allocated |
| 5 | The cluster actually advertises the attributes the RCT requires | Every required key is present in the advertised list |
The reference RCT (numa-aligned.yaml) requests only NICs that can use RDMA (NICs whose dra.net/rdma is true). dranet sets dra.net/rdma to true when the NIC vendor's RDMA driver is loaded. The Broadcom NICs of the reference node use bnxt_re as their RDMA driver. On each node, check that the RDMA driver recognizes the NICs.
Run the same ls /sys/class/infiniband/ check inside the modelserver container. Inside a Pod, the list shows only the NICs allocated to that Pod.
Item (5) attribute cross-check¶
Compare the attributes the RCT requires with the ones the cluster advertises. If any required attribute is missing, the Pods stay Pending with the event cannot allocate all claims. The cannot allocate all claims event does not name the missing attribute.
Every key from (a) must be present in the list for the corresponding driver in (b). If resource.kubernetes.io/numaNode or resource.kubernetes.io/pcieRoot is missing, delete the npu-rdma RCT and then apply numa-unaligned.yaml. Kubernetes rejects an apply that changes the spec of an existing RCT. If a dra.net attribute of the NIC selector is missing, edit the NIC selector. numa-unaligned.yaml has the same NIC selector as numa-aligned.yaml.
Key device settings¶
Set the following chart values to match the RCT.
| Key | Description | Default |
|---|---|---|
devices.npu.count | The number of NPUs per Pod that the chart declares. At render time, the chart checks devices.npu.count against the product of the data, tensor, and pipeline parallel sizes. Set devices.npu.count to the RCT's NPU count | 4 |
devices.claimTemplateName | The RCT name the Pod references | npu-rdma |
For the RDS node label, see Node preparation › RDS setup.
Device-plugin mode¶
On a cluster without DRA, install the chart in device-plugin mode with the following values. Device-plugin mode uses no RCT and does not guarantee NUMA alignment. Device-plugin mode is Unverified.