跳到主要内容

Dynamia ascend-device-plugin Chart 0.3.1

发布时间:2026-10-26

版本上一版本版
Chart0.3.00.3.1
appVersionv1.4.3v1.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 为准。

展开参数表
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 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.configRootstring"/var/lib/hami-enpu"Host directory for per-container ENPU configs.
enpu.defaultPolicystring"elastic"Default ENPU scheduling policy.
enpu.exposeAllDevicesboolfalseExpose all davinci devices; keep false for device isolation.
enpu.managerConfigRootstring""Manager config_dir or its vcann-rt subdirectory; empty uses configRoot.
enpu.managerURLstring""Optional node-local enpu-manager REST endpoint.
enpu.monitorPathstring"/usr/local/enpu/vcann-rt/tools/enpu-monitor"Host path to enpu-monitor.
enpu.preloadPathstring"/usr/local/enpu/vcann-rt/ld.so.preload"Host path to ld.so.preload.
enpu.runtimePathstring"/usr/local/enpu/vcann-rt/lib/libvruntime.so"Host path to libvruntime.so.
enpu.systemdDetectVirtPathstring""Optional host binary; prefer providing it in the workload image.
fullnameOverridestring""Override the fully qualified resource name.
hamiVnpuCore.coreUtilizationPolicystring"default"Default utilization override for containers without NPU_CORE_UTILIZATION_POLICY. default permits hamiCorePolicy (spatial by default); explicit force and disable retain precedence.
hamiVnpuCore.defaultPolicystring"spatial"Default hami-core compute policy: spatial, dynamic, fixed, or overdraft. Pod huawei.com/npu-sched-policy and node hamiCorePolicy override it.
hamiVnpuCore.deviceCoreScalingfloat1hami-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.enabledboolfalseEnable hami-vnpu-core in the bundled device configuration when config.create=true. This mode requires the HAMi scheduler.
hamiVnpuModestring""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.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.