跳到主要内容

Dynamia ascend-device-plugin Chart 0.3.0

发布时间:2026-10-26

版本上一版本版
Chart0.2.20.3.0
appVersionv1.4.2v1.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-core98ec21f,以及 86b120e 的 HostArgs 支持逐设备运行状态、空间算力控制,以及新增的显存分配和计算提交钩子。

HAMi Enterprise 兼容性​

功能或模式最低可用 HAMi Enterprise 版本本版配套要求与升级结论
模板化硬切分v2.9.0-rc0可沿用既有调度器。
hami-core 静态软切分,包括企业版算力策略、任务优先级与 Turbov2.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,使其获得更新后的授权。

升级说明​

准备配套组件与运行库​

  1. 使用 hami-core 时,先按需将 HAMi Enterprise 升级至 v2.10.0-r2 并完成许可证激活。软切分工作负载容器使用 UTC 时区。
  2. 记录每个工作负载实际使用的共享内存路径及宿主机挂载映射。停止待迁移的旧版软切分工作负载,确认所有使用对应共享状态的进程均已退出。
  3. 备份受影响状态,使用新的本地和全局路径,或仅清理这些已停止工作负载拥有的旧文件。新运行库按卡使用 .device-<物理设备 ID> 文件;默认宿主机本地文件位于 /usr/local/hami-vnpu-core/containers/<Pod UID>_<容器名>/,新的默认全局文件为 /usr/local/hami-shared-region/global_registry.device-<物理设备 ID>。挂载或 HOOK_PATH 已自定义时以实际路径为准。不要删除仍在使用的映射,也不要让新旧运行库共用同一文件。
  4. 升级插件,确认节点已安装配套 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 为准。

展开参数表
KeyTypeDefaultDescription
config.createboolfalseCreate the bundled device configuration ConfigMap for an installation without HAMi. Leave disabled when HAMi owns the device configuration.
config.deviceConfigMapNamestring"hami-scheduler-device"Name of the device configuration ConfigMap created when config.create=true.
config.existingDeviceConfigMapNamestring"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.namestring"hami-ascend-device-plugin"Device plugin DaemonSet name.
deviceSplitCountint10Number 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.
fullnameOverridestring""Override the fully qualified resource name.
hamiVnpuCore.coreUtilizationPolicystring"force"Default compute policy injected into hami-core containers that do not declare NPU_CORE_UTILIZATION_POLICY.
hamiVnpuCore.enabledboolfalseEnable hami-vnpu-core in the bundled device configuration when config.create=true. This mode requires the HAMi scheduler.
image.digeststring""Optional immutable OCI manifest digest. When set, it takes precedence over image.tag.
image.pullPolicystring"IfNotPresent"Kubernetes image pull policy.
image.repositorystring"ghcr.io/dynamia-ai/ascend-device-plugin"Container image repository.
image.tagstring""Container image tag. Defaults to the chart appVersion when empty.
nameOverridestring""Override the chart name used in resource names.
nodeConfigstring"nodes: []"Per-node hami-vnpu-core configuration written to the node ConfigMap.
nodeConfigMap.createbooltrueCreate the per-node configuration ConfigMap.
nodeConfigMap.namestring"hami-device-node-config"Per-node configuration ConfigMap name.
nodeSelector.ascendstring"on"Node label value used to schedule the device plugin.
rbac.namestring"hami-ascend"Name shared by the chart-managed RBAC resources.
resources.limits.cpustring"500m"
resources.limits.memorystring"500Mi"
resources.requests.cpustring"500m"
resources.requests.memorystring"500Mi"
runtimeClass.createbooltrueCreate the Ascend RuntimeClass.
runtimeClass.handlerstring"ascend"Container runtime handler used by the RuntimeClass.
runtimeClass.namestring"ascend"RuntimeClass resource name.
serviceAccount.createbooltrueCreate a ServiceAccount for the device plugin.
serviceAccount.namestring"hami-ascend"ServiceAccount name.
vnpuMonitor.enabledboolfalseExpose device plugin metrics and create optional Prometheus Operator resources.
vnpuMonitor.prometheusRule.createbooltrueCreate a PrometheusRule when vnpuMonitor.enabled=true.
vnpuMonitor.prometheusRule.groupLabels.vendorstring"ascend"
vnpuMonitor.prometheusRule.groupNamestring"ascend-vnpu"Recording-rule group name.
vnpuMonitor.prometheusRule.intervalstring"15s"Recording-rule evaluation interval.
vnpuMonitor.prometheusRule.labels.releasestring"prometheus"
vnpuMonitor.prometheusRule.labels.rolestring"recording-rules"
vnpuMonitor.prometheusRule.labels.vendorstring"ascend"
vnpuMonitor.prometheusRule.namestring"hami-ascend-vnpu-monitor"PrometheusRule resource name.
vnpuMonitor.prometheusRule.namespacestring"monitoring"Namespace for the PrometheusRule.
vnpuMonitor.service.namestring"hami-ascend-device-plugin-metrics"Headless Service that exposes the device plugin metrics port.
vnpuMonitor.serviceMonitor.createbooltrueCreate a ServiceMonitor when vnpuMonitor.enabled=true.
vnpuMonitor.serviceMonitor.intervalstring"15s"Prometheus scrape interval.
vnpuMonitor.serviceMonitor.labels.releasestring"prometheus"
vnpuMonitor.serviceMonitor.namestring"hami-ascend-vnpu-monitor"ServiceMonitor resource name.
vnpuMonitor.serviceMonitor.namespacestring"monitoring"Namespace for the ServiceMonitor.
vnpuMonitor.serviceMonitor.pathstring"/metrics"Metrics HTTP path.