Dynamia ascend-device-plugin Chart 0.3.1
发布时间:2026-10-26
| 版本 | 上一版 | 本版 |
|---|---|---|
| Chart | 0.3.0 | 0.3.1 |
| appVersion | v1.4.3 | v1.4.3 |
Chart 0.3.1 是 0.3.0 的部署 patch,补齐既有应用 v1.4.3 所需的配置与挂载。应用镜像及配套 libvnpu 版本不变;开源基线、企业版扩展及应用变化见 Chart 0.3.0。
HAMi Enterprise 兼容性
| 功能或模式 | 最低可用 HAMi Enterprise 版本 | 本版配套要求与升级结论 |
|---|---|---|
| 模板化硬切分 | v2.9.0-rc0 | 可沿用既有调度器。 |
hami-core 静态软切分 | v2.10.0-r2 | 沿用应用 v1.4.3 引入的运行授权要求。已经满足时,本 patch 无需再次升级 Enterprise。 |
| 自动显存扩容 | v2.10.0-r2 | 沿用单 vNPU 普通容器的范围、审批与准入要求,以及配套 Chart 的 Kubernetes 1.30 下限。 |
ENPU 调度,或 deviceCoreScaling 大于 1 的 hami-core 算力超卖 | v2.10.0-r5 | 需要调度器具备对应后端与资源记账能力,并使用匹配的共享设备配置和节点配置;仅升级插件 Chart 不会提供这部分配套功能。 |
版本变化
Chart 变化
- [企业版特性] 补齐 ENPU 部署挂载:运行时目录
/usr/local/enpu/vcann-rt、逐容器配置根目录(默认/var/lib/hami-enpu),以及只读的宿主机进程信息/host/proc。新增对应的enpu.*环境与配置参数,ENPU 默认策略为elastic;可选管理器参数用于指定节点本地管理器和配置目录。 - [企业版特性] 新增显式后端选择参数
hamiVnpuMode,并将hamiCorePolicy、deviceCoreScaling、enpuPolicy渲染进内置设备配置。后端参数为空时沿用旧hamiVnpuCore.enabled回退,节点级模式优先;无效值会使渲染失败。 - [企业版特性] 将
hamiVnpuCore.coreUtilizationPolicy从force改为default,新增hamiVnpuCore.defaultPolicy=spatial。显式设置的force和disable仍优先于调度策略选择。应用版本虽然不变,默认算力控制行为仍会变化。 - [企业版特性] 新增
hamiVnpuCore.deviceCoreScaling,默认值为1,用于配置上报的算力超卖比例。大于1时增加可调度的算力点数,不增加物理算力容量。
本 patch 不升级应用版本。多卡控制、ENPU 后端及运行授权均属于应用 v1.4.3,在 0.3.0 发布说明中记录。
升级说明
- 升级前检查算力策略。保留
0.3.0行为时,显式设置hamiVnpuCore.coreUtilizationPolicy=force。采用新默认值时使用default和spatial,并检查工作负载的NPU_CORE_UTILIZATION_POLICY、Pod 的huawei.com/npu-sched-policy和节点级hamiCorePolicy覆盖。空间控制使用协作式核心预算,不保证推理吞吐按配额成比例变化。 - 默认
config.create=false时,更新 HAMi 管理的共享设备配置和相关节点配置;只修改插件 Chart 的内置deviceConfig不会改变外部 ConfigMap。ENPU 节点使用hamiVnpuMode: enpu,对应工作负载显式设置huawei.com/vnpu-mode: enpu;hami-core节点保留匹配的模式与调度策略。切换节点后端前,先停止或迁移受影响工作负载。 - 使用 ENPU 或算力超卖前,满足
v2.10.0-r5配套要求。调度器与插件的deviceCoreScaling配置保持一致;不需要超卖时保留1。ENPU 的有效虚拟设备数量上限为每张物理设备100,单个容器使用一个物理 DIE。 - 按昇腾部署指南准备 ENPU 资源和工作负载,包括匹配的驱动与运行时、昇腾容器运行时处理器、容器工具,以及使用 mem-swap 时的节点本地管理器连接。随附运行时提供基础软切分;mem-swap 需要另行准备支持该能力的运行时和管理器,管理器地址必须指向插件所在节点。
- 保留默认镜像
ghcr.io/dynamia-ai/ascend-device-plugin:v1.4.3或其对应的不可变摘要。已经完成0.3.0要求的运行库状态迁移时,本次仅 Chart patch 无需重复迁移;仍使用更早应用的部署先按 0.3.0 迁移步骤处理。
通过既有 Helm release 应用配置,确认 DaemonSet 完成滚动更新、插件重新加载配置,再检查设备注册与所选后端,最后重建工作负载。
Values 说明
以下参数说明取自 Chart 0.3.1 发布包随附的 README,保留原文。默认配置以该版本的 values.yaml 为准。
展开参数表
| Key | Type | Default | Description |
|---|---|---|---|
| config.create | bool | false | Create the bundled device configuration ConfigMap for an installation without HAMi. Leave disabled when HAMi owns the device configuration. |
| config.deviceConfigMapName | string | "hami-scheduler-device" | Name of the device configuration ConfigMap created when config.create=true. |
| config.existingDeviceConfigMapName | string | "hami-scheduler-device" | HAMi-managed device configuration ConfigMap to reuse when config.create=false. The ConfigMap must be in the release namespace. |
| daemonSet.args[0] | string | "--config_file" | |
| daemonSet.args[1] | string | "/device-config.yaml" | |
| daemonSet.args[2] | string | "--v=4" | |
| daemonSet.args[3] | string | "--node_config_file" | |
| daemonSet.args[4] | string | "/node-config.yaml" | |
| daemonSet.name | string | "hami-ascend-device-plugin" | Device plugin DaemonSet name. |
| deviceSplitCount | int | 10 | Number of virtual devices advertised per physical Ascend NPU in hami-core or enpu mode when this chart creates the device configuration. A positive node-level vDeviceCount overrides it; ENPU caps the count at 100. |
| enpu.configRoot | string | "/var/lib/hami-enpu" | Host directory for per-container ENPU configs. |
| enpu.defaultPolicy | string | "elastic" | Default ENPU scheduling policy. |
| enpu.exposeAllDevices | bool | false | Expose all davinci devices; keep false for device isolation. |
| enpu.managerConfigRoot | string | "" | Manager config_dir or its vcann-rt subdirectory; empty uses configRoot. |
| enpu.managerURL | string | "" | Optional node-local enpu-manager REST endpoint. |
| enpu.monitorPath | string | "/usr/local/enpu/vcann-rt/tools/enpu-monitor" | Host path to enpu-monitor. |
| enpu.preloadPath | string | "/usr/local/enpu/vcann-rt/ld.so.preload" | Host path to ld.so.preload. |
| enpu.runtimePath | string | "/usr/local/enpu/vcann-rt/lib/libvruntime.so" | Host path to libvruntime.so. |
| enpu.systemdDetectVirtPath | string | "" | Optional host binary; prefer providing it in the workload image. |
| fullnameOverride | string | "" | Override the fully qualified resource name. |
| hamiVnpuCore.coreUtilizationPolicy | string | "default" | Default utilization override for containers without NPU_CORE_UTILIZATION_POLICY. default permits hamiCorePolicy (spatial by default); explicit force and disable retain precedence. |
| hamiVnpuCore.defaultPolicy | string | "spatial" | Default hami-core compute policy: spatial, dynamic, fixed, or overdraft. Pod huawei.com/npu-sched-policy and node hamiCorePolicy override it. |
| hamiVnpuCore.deviceCoreScaling | float | 1 | hami-core compute oversell ratio. The plugin advertises Devcore = round(100 * deviceCoreScaling) so HAMi can admit more than 100% of -core on one card. Values below 1 are not supported. |
| hamiVnpuCore.enabled | bool | false | Enable hami-vnpu-core in the bundled device configuration when config.create=true. This mode requires the HAMi scheduler. |
| hamiVnpuMode | string | "" | Default backend: template, hami-core (alias hamiCore), or enpu. Empty uses template, or hami-core if the deprecated hamiVnpuCore.enabled is true. Node mode takes priority. |
| image.digest | string | "" | Optional immutable OCI manifest digest. When set, it takes precedence over image.tag. |
| image.pullPolicy | string | "IfNotPresent" | Kubernetes image pull policy. |
| image.repository | string | "ghcr.io/dynamia-ai/ascend-device-plugin" | Container image repository. |
| image.tag | string | "" | Container image tag. Defaults to the chart appVersion when empty. |
| nameOverride | string | "" | Override the chart name used in resource names. |
| nodeConfig | string | "nodes: []" | Per-node hami-vnpu-core configuration written to the node ConfigMap. |
| nodeConfigMap.create | bool | true | Create the per-node configuration ConfigMap. |
| nodeConfigMap.name | string | "hami-device-node-config" | Per-node configuration ConfigMap name. |
| nodeSelector.ascend | string | "on" | Node label value used to schedule the device plugin. |
| rbac.name | string | "hami-ascend" | Name shared by the chart-managed RBAC resources. |
| resources.limits.cpu | string | "500m" | |
| resources.limits.memory | string | "500Mi" | |
| resources.requests.cpu | string | "500m" | |
| resources.requests.memory | string | "500Mi" | |
| runtimeClass.create | bool | true | Create the Ascend RuntimeClass. |
| runtimeClass.handler | string | "ascend" | Container runtime handler used by the RuntimeClass. |
| runtimeClass.name | string | "ascend" | RuntimeClass resource name. |
| serviceAccount.create | bool | true | Create a ServiceAccount for the device plugin. |
| serviceAccount.name | string | "hami-ascend" | ServiceAccount name. |
| vnpuMonitor.enabled | bool | false | Expose device plugin metrics and create optional Prometheus Operator resources. |
| vnpuMonitor.prometheusRule.create | bool | true | Create a PrometheusRule when vnpuMonitor.enabled=true. |
| vnpuMonitor.prometheusRule.groupLabels.vendor | string | "ascend" | |
| vnpuMonitor.prometheusRule.groupName | string | "ascend-vnpu" | Recording-rule group name. |
| vnpuMonitor.prometheusRule.interval | string | "15s" | Recording-rule evaluation interval. |
| vnpuMonitor.prometheusRule.labels.release | string | "prometheus" | |
| vnpuMonitor.prometheusRule.labels.role | string | "recording-rules" | |
| vnpuMonitor.prometheusRule.labels.vendor | string | "ascend" | |
| vnpuMonitor.prometheusRule.name | string | "hami-ascend-vnpu-monitor" | PrometheusRule resource name. |
| vnpuMonitor.prometheusRule.namespace | string | "monitoring" | Namespace for the PrometheusRule. |
| vnpuMonitor.service.name | string | "hami-ascend-device-plugin-metrics" | Headless Service that exposes the device plugin metrics port. |
| vnpuMonitor.serviceMonitor.create | bool | true | Create a ServiceMonitor when vnpuMonitor.enabled=true. |
| vnpuMonitor.serviceMonitor.interval | string | "15s" | Prometheus scrape interval. |
| vnpuMonitor.serviceMonitor.labels.release | string | "prometheus" | |
| vnpuMonitor.serviceMonitor.name | string | "hami-ascend-vnpu-monitor" | ServiceMonitor resource name. |
| vnpuMonitor.serviceMonitor.namespace | string | "monitoring" | Namespace for the ServiceMonitor. |
| vnpuMonitor.serviceMonitor.path | string | "/metrics" | Metrics HTTP path. |