Dynamia ascend-device-plugin Chart 0.3.0
发布时间:2026-10-26
| 版本 | 上一版 | 本版 |
|---|---|---|
| Chart | 0.2.2 | 0.3.0 |
| appVersion | v1.4.2 | v1.4.3 |
本次 Chart minor 升级交付应用 v1.4.3 和商业版 libvnpu v1.4.3,新增多 NPU 场景下的逐卡资源控制。正式 Chart 包仍保留 force 算力策略默认值;ENPU 部署配置由后续的 Chart 0.3.1 patch 补齐。
开源基线
本版按功能集成以下开源基线,并保留企业版资源管理与运行库扩展。
| 组件 | 开源基线 | 本版交付范围 |
|---|---|---|
| Ascend 设备插件 | ab41bec | 逐卡配额与监控、统一虚拟设备数量配置及后端选择。正式 Chart 包存在下文所述的部署限制。 |
| hami-vnpu-core | 98ec21f,以及 86b120e 的 HostArgs 支持 | 逐设备运行状态、空间算力控制,以及新增的显存分配和计算提交钩子。 |
HAMi Enterprise 兼容性
| 功能或模式 | 最低可用 HAMi Enterprise 版本 | 本版配套要求与升级结论 |
|---|---|---|
| 模板化硬切分 | v2.9.0-rc0 | 可沿用既有调度器。 |
hami-core 静态软切分,包括企业版算力策略、任务优先级与 Turbo | v2.10.0-r2 | 使用更早版本时,先升级 Enterprise 并完成许可证激活。应用 v1.4.3 需要该版本提供的配套运行授权。 |
| 自动显存扩容 | v2.10.0-r2 | 须由普通容器显式使用 hami-core、分配单个 vNPU,并启用扩容审批与准入保护。配套 Chart 要求 Kubernetes 1.30 或更高版本。多 NPU 分配不会将自动扩容范围扩大至多卡。 |
应用包含 ENPU 后端,但本 Chart 包尚未提供所需的运行时和配置目录挂载。完整部署配置及 Enterprise 配套要求见 Chart 0.3.1。
企业版扩展
以下能力在此前商业版本中已交付,本版继续保留:
- 显存自动扩容仅在 HAMi Enterprise 审批通过后提高单 vNPU 容器的显存限额,不改变 Pod 资源请求或 AI Core 配额。
NPU_CORE_UTILIZATION_POLICY=force限制平均算力占空比。NPU_TASK_PRIORITY数值越小优先级越高,在计算提交边界协作式抢占。已提交任务自然完成,不保证固定抢占延迟;持续的高优先级负载可能延迟低优先级任务。NPU_TURBO_MODE=true关闭算力节流与优先级仲裁,保留显存限额、记账及经审批的扩容。仅用于可信、算力独占的工作负载。- 保留
image.digest固定镜像,以及vnpuMonitor指标服务、ServiceMonitor 和 PrometheusRule 配置。
版本变化
Chart 变化
- [开源同步] 内置配置字段和 Helm 参数由
vnpuDeviceSplitCount改为deviceSplitCount,默认值仍为10;正数的节点级vDeviceCount优先。来源:ascend-device-plugin #144。 - [企业版特性] 默认
image.tag由v1.4.2改为空值,使镜像模板跟随appVersion;显式设置的image.tag或image.digest仍可覆盖该选择。
应用变化
- [开源同步] 支持多卡分配中的逐物理 NPU 显存与算力配额,每张卡使用自己的限额,不再将多卡配额相加。单个容器分配的各卡有效显存和算力配额必须相同,否则拒绝分配;监控按实际分配的物理设备采集。来源:ascend-device-plugin #147、hami-vnpu-core #44。
- [开源同步] 新增空间算力控制,以及
dynamic、fixed、overdraft调度策略。空间控制通过 CANN 设置协作式 Cube/Vector 预算,不构成独占硬件分区,也不保证推理吞吐按配额成比例变化。正式 Chart 仍默认注入force。来源:ascend-device-plugin #145、hami-vnpu-core #43、#44。 - [开源同步] 将显存配额记账扩展到缓存、带配置参数的分配及运行时 HBM 分配接口,跟踪分配标识与物理句柄引用,避免重复记账或错误返还配额;原生分配失败时回滚预留。来源:hami-vnpu-core #46。
- [开源同步] 将 ACL HostArgs 即时提交纳入与其他拦截入口相同的算力准入流程。来源:hami-vnpu-core #41。
- [企业版特性] 为
hami-core工作负载增加运行授权校验。创建工作负载前完成 Enterprise 许可证激活;许可证续期后重建 Pod,使其获得更新后的授权。
升级说明
准备配套组件与运行库
- 使用
hami-core时,先按需将 HAMi Enterprise 升级至v2.10.0-r2并完成许可证激活。软切分工作负载容器使用 UTC 时区。 - 记录每个工作负载实际使用的共享内存路径及宿主机挂载映射。停止待迁移的旧版软切分工作负载,确认所有使用对应共享状态的进程均已退出。
- 备份受影响状态,使用新的本地和全局路径,或仅清理这些已停止工作负载拥有的旧文件。新运行库按卡使用
.device-<物理设备 ID>文件;默认宿主机本地文件位于/usr/local/hami-vnpu-core/containers/<Pod UID>_<容器名>/,新的默认全局文件为/usr/local/hami-shared-region/global_registry.device-<物理设备 ID>。挂载或HOOK_PATH已自定义时以实际路径为准。不要删除仍在使用的映射,也不要让新旧运行库共用同一文件。 - 升级插件,确认节点已安装配套 libvnpu
v1.4.3,再重建工作负载。仅滚动插件不会更新已运行容器使用的库与挂载。
检查配置
- 将自定义 Helm 参数
vnpuDeviceSplitCount改为deviceSplitCount,保留原值。默认config.create=false时,更新实际共用的设备 ConfigMap。应用仍接受旧设备配置字段作为回退;新旧字段同时存在时,deviceSplitCount优先,节点级vDeviceCount仍有更高优先级。修改配置后重启插件。 - 检查
image.tag和image.digest。显式保留v1.4.2标签或其摘要会阻止新应用部署到节点;本版默认目标镜像为ghcr.io/dynamia-ai/ascend-device-plugin:v1.4.3。 - 检查手工设置的
NPU_MEMORY_LIMIT_MB、NPU_COMPUTE_LIMIT及旧配额变量。限额按卡生效;同时提供新旧别名时,数值必须一致。未设置或设为零的-core请求仍是仅显存、尽力而为的用法,不预留或保证全部算力。 - Chart 的
hamiVnpuCore.coreUtilizationPolicy仍为force。采用完整后端配置或default/spatial默认值时,按 0.3.1 patch 升级说明 处理。
沿用自动显存扩容的部署仍须保留审批与准入配置,显式指定 huawei.com/vnpu-mode: hami-core,且每个普通容器只分配一个 vNPU。初始化容器和多 vNPU 容器不在自动扩容范围内。
Values 说明
以下参数说明取自 Chart 0.3.0 发布包随附的 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 soft-slicing mode when this chart creates the device configuration. A positive node-level vDeviceCount overrides it. |
| fullnameOverride | string | "" | Override the fully qualified resource name. |
| hamiVnpuCore.coreUtilizationPolicy | string | "force" | Default compute policy injected into hami-core containers that do not declare NPU_CORE_UTILIZATION_POLICY. |
| hamiVnpuCore.enabled | bool | false | Enable hami-vnpu-core in the bundled device configuration when config.create=true. This mode requires the HAMi scheduler. |
| 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. |