Skip to content

RBLN NPU Feature Discovery

The RBLN SDK offers NPU Feature Discovery, a tool that automatically generates Kubernetes node labels for Rebellions' NPUs present on a node. This functionality builds upon Kubernetes Node Feature Discovery to apply these labels effectively.

Deployment

Step 1: Prepare NPU Nodes

Follow the instructions outlined in the device plugin documentation to set up Kubernetes nodes with RBLN NPUs and ensure the RBLN Driver is installed.

Step 2: Deploy Kubernetes Node Feature Discovery

Ensure that Node Feature Discovery (NFD) is operational on all nodes you intend to label. The RBLN NPU Feature Discovery utilizes the local feature source, requiring the directory /etc/kubernetes/node-feature-discovery/features.d/ to be present on your nodes. This directory will be mounted to the RBLN NFD pods.

You can install NFD using one of the deployment methods detailed on this page, such as Kustomize, Helm, or Operator.

Step 3: Deploy RBLN NPU Feature Discovery

Deploy the RBLN NPU Feature Discovery as a DaemonSet pod on each node by executing the following command:

$ kubectl apply -f https://raw.githubusercontent.com/rebellions-sw/rbln-npu-feature-discovery/main/deployments/static/npu-feature-discovery-daemonset.yaml

Note

The manifest includes a node affinity rule specified as feature.node.kubernetes.io/pci-1200_1eff.present or feature.node.kubernetes.io/pci-1eff.present, ensuring that the DaemonSet pods only run on nodes with a PCI device from the vendor ID 1eff (Rebellions). Adjust and utilize the manifest as needed.

Once both NFD and RBLN NPU Feature Discovery are deployed and running, NPU-related labels should appear on nodes equipped with NPUs. You can verify this with:

$ kubectl get node <npu-node-name> -o yaml
apiVersion: v1
items:
- apiVersion: v1
  kind: Node
  metadata:
    ...
    labels:
      ...
      rebellions.ai/driver-version.full=1.2.92
      rebellions.ai/driver-version.major=1
      rebellions.ai/driver-version.minor=2
      rebellions.ai/driver-version.patch=92
      rebellions.ai/npu.count=2
      rebellions.ai/npu.present=true
      rebellions.ai/npu.product=RBLN-CA12
      ...

Generated Labels

The following table lists the labels produced by RBLN NPU Feature Discovery along with their descriptions.

Note

In Kubernetes, label values are always strings. The "Value Type" column indicates the type represented within the string format.

Label Name Value Type Meaning Examples
rebellions.ai/driver-version.full String Full semantic version of the RBLN driver 1.2.92
rebellions.ai/driver-version.major Integer Major component of the RBLN driver’s semantic version 1
rebellions.ai/driver-version.minor Integer Minor component of the RBLN driver’s semantic version 2
rebellions.ai/driver-version.patch Integer Patch component of the RBLN driver’s semantic version 92
rebellions.ai/npu.count Integer Number of NPUs on the node 2
rebellions.ai/npu.present Boolean Indicates the presence of RBLN NPUs on the node true, false
rebellions.ai/npu.product String Product name of the NPU RBLN-CA22, RBLN-CR22

NPU Product Family Label

The RBLN NPU Operator applies rebellions.ai/npu.family through a NodeFeatureRule named rbln-npu-family, deriving the value from the PCI device ID. NPU Feature Discovery does not produce this label.

Label Name Value Type Meaning Examples
rebellions.ai/npu.family String NPU product family, applied by the operator in lowercase atom

NPU product family label without the operator

When running NPU Feature Discovery without the operator, apply your own NodeFeatureRule to provide this label.

Logging

The component writes structured logs to stdout. Configure the log level and output format with the following environment variables:

Variable Description Default
RBLN_NPU_FEATURE_DISCOVERY_LOG_LEVEL Verbosity: error, warning (or warn), info, debug. info
RBLN_NPU_FEATURE_DISCOVERY_LOG_FORMAT Output format: json or text. json

An invalid value falls back to the default and logs a warning rather than failing startup. When deployed by the RBLN NPU Operator, configure these settings with the chart's npuFeatureDiscovery.logging values. See Component Logging.