跳到主要内容

Dynamia ascend-device-plugin Chart 0.1.1

发布时间:2026-08-17

版本上一版本版
Chart0.1.00.1.1
appVersionv1.3.0v1.4.0

本页对应 2026-08-17 发布、默认应用为 v1.4.0 的 Chart 包。历史 OCI 仓库中还存在默认应用为 v1.3.0 的同名 0.1.1 包;该旧包不包含下述应用升级和监控配置变化。获取安装包时,应同时核对 Chart 版本、appVersion 和默认镜像。

HAMi Enterprise 兼容性​

功能或模式最低可用 HAMi Enterprise 版本本版配套要求与升级结论
既有设备和模板的硬切分v2.7.1-rc0可沿用既有调度协议。配套 2.7/2.8 系列时,插件需使用独立的新格式设备配置,并与调度器保持相同设备、资源名及模板;不能直接复用旧格式共享配置。
hami-core 静态软切分v2.9.0-rc0节点启用软切分,工作负载显式设置 huawei.com/vnpu-mode: hami-core 并申请对应显存、算力资源。若保留旧自动注入的 PostStart,容器内的 bash 必须能启动并加载预加载库;该钩子不能启动新管理器。已有不调用旧 limiter 的有效自定义 PostStart 会被保留。
静态软切分,且不再自动注入旧 limiter 启动钩子v2.10.0-r2该版本移除旧自动注入。无法满足旧钩子的执行条件、且没有有效自定义 PostStart 的工作负载,可先升级至此配套版本。

版本变化​

Chart 变化​

  • [开源同步] 新增默认关闭的 vnpuMonitor.enabled,可创建暴露 9395 端口的 Service,以及 ServiceMonitor 和 PrometheusRule。记录规则把插件指标转换为 kantaloupe_* 指标供监控使用;启用条件和标签处理见升级说明。来源:ascend-device-plugin #108。
  • [开源同步] Chart 新增 Kubernetes >=1.20.0-0 版本检查;较低版本集群会被 Helm 拒绝安装。来源:ascend-device-plugin #113。
  • [开源同步] daemonSet.args 默认增加 --v=4,调整插件日志详细程度。来源:ascend-device-plugin #112。
  • [企业版特性] 放宽 values 的顶层字段校验,允许父 Chart 等传入额外顶层配置,例如 global。已有子对象仍按各自规则校验;额外字段不会因此自动被模板使用。

应用变化​

  • [开源同步] 随附的 libvnpu v1.4.0 将软切分管理线程移入 libvnpu.so,在首次 NPU 调用时启动,并支持失活管理者接管。独立回收线程与饱和扣减改进进程退出后的显存记账;插件不再分发独立的 limiter 可执行文件。来源:hami-vnpu-core #11、ascend-device-plugin #98。
  • [企业版特性] 在内嵌管理器中补充等待期间的心跳刷新、异常退出后的重新启动,以及注册表满时的退避处理,减少等待时被误判为失活等问题。
  • [开源同步] 软切分节点启动插件时,自动为所管理的卡和芯片开启 device-share。任一卡操作失败会中止本轮启动;已完成的设置不会自动回滚。来源:ascend-device-plugin #95。
  • [开源同步] 支持节点配置中的 filterDevices.uuid 和 filterDevices.index,从注册、健康检查和空闲虚拟设备清理中排除指定设备;其中 index 指物理卡的 card ID。节点级正数 vDeviceCount 可覆盖全局推导的虚拟设备数量。来源:ascend-device-plugin #76、#100。
  • [开源同步] 软切分模式向调度器上报的算力容量统一为 100,与百分比分配口径保持一致。Pod 未设置 huawei.com/vnpu-mode 时,插件的 Allocate 路径会跟随节点模式;配套旧调度器时仍须显式声明模式,不能只依赖插件的缺省判断。来源:ascend-device-plugin #91、#106。
  • [开源同步] 改进 kubelet 重启后的设备插件重新注册:重新创建 gRPC 服务,等待后台线程退出并清理旧 socket,调整 Unix socket 连接与就绪检查。来源:ascend-device-plugin #84、#92。
  • [开源同步] 周期性空闲 vNPU 清理改为默认关闭,降低工作负载尚未使用设备时被提前回收的风险。可通过 --enable_periodic_idle_vnpu_cleanup 显式开启;插件启动或重启时的一次清理仍保留。来源:ascend-device-plugin #120。
  • [企业版特性] 将主要监控指标从 vnpu_* 统一为 hami_*,不再同时保留旧名称。名称映射及删除项见升级说明。
  • [开源同步] 普通业务容器的显存监控按所用设备 UUID 输出,改进多卡数据处理;监控初始化不再阻塞插件注册;:9395/metrics 改为仅在软切分节点启动,硬切分节点不再提供原有指标端点。容器设备利用率取对应物理卡的 AI Core 利用率,单位为 0–100,不是该容器独占的算力占比;同卡容器可能得到相同值。来源:ascend-device-plugin #87、#93。

新增的 hami_vgpu_memory_context_bytes、hami_vgpu_memory_module_bytes、hami_vgpu_memory_buffer_bytes 在本版仍固定输出 0,不能据此判断实际显存构成。

升级说明​

  • 核对安装包和镜像。 使用上述默认应用为 v1.4.0 的发布包,确认 Kubernetes 满足本 Chart 的版本检查。默认镜像为 ghcr.io/dynamia-ai/ascend-device-plugin:v1.4.0;自定义 image.tag 时需同步更新,设置了 image.digest 时需更新摘要或清空该值,因为摘要优先于标签。仅指定 Chart 0.1.1 不能区分两套历史制品。
  • 保留旧调度器时分开设备配置。 仅适用于 2.7/2.8 系列的既有硬切分部署:保留调度器原来的 vnpus 列表配置,使用同命名空间的独立插件 ConfigMap,将原设备列表放到 vnpus.configs 下,并设置 vnpus.hamiVnpuCore: false。保持 config.create=false,将 config.existingDeviceConfigMapName 指向该独立 ConfigMap;其数据键仍为 device-config.yaml。不要把旧调度器的共享配置原地改为新结构。设备、资源名和模板参数须两端一致,并沿用已有有效的 Ascend runtime 选择。已有符合这些条件的独立配置可以保留;2.9.0-rc0 的设备配置已采用新结构。
  • 先停止旧软切分进程,再更新插件并重建工作负载。 停止受影响的旧工作负载及独立 limiter,移除自定义模板中的旧 limiter 启动命令,并保留所需的业务初始化操作。新插件删除宿主机上的独立 limiter;新管理器随 NPU 调用启动,不能由旧命令驱动。旧 Enterprise webhook 仍可能注入通过 bash 在后台运行 limiter 的 PostStart;保留该钩子时,容器内的 bash 必须能正常启动。也可保留不再调用旧 limiter 的有效自定义 PostStart,或采用已移除自动注入的 v2.10.0-r2。不要让新旧管理器同时使用同一容器状态。
  • 在容器进程启动前满足预加载依赖。 libvnpu v1.4.0 新增 libdcmi.so 依赖,同时仍需 libruntime.so。软切分容器必须在动态进程加载 libvnpu.so 时就能解析这些 CANN/驱动库及其依赖,包括 PostStart 的 bash;仅在业务 entrypoint 执行后设置 LD_LIBRARY_PATH 不足。升级前检查驱动库挂载和动态链接器搜索路径。
  • 重建容器本地共享状态。 本次运行库增加容器本地管理状态字段。重建 Pod 可通过新的 Pod UID 创建新的本地状态目录;仅滚动插件不足以迁移正在运行的旧进程。如需清理遗留文件,先根据实际 NPU_LOCAL_SHM_PATH 和挂载定位,确认所有使用者已退出,再清理对应旧容器状态。默认容器路径 /hami-vnpu-shmem/vnpu_local_shmem 映射到宿主机 /usr/local/hami-vnpu-core/containers/<Pod UID>_<容器名>/vnpu_local_shmem;自定义插件 HOOK_PATH 或挂载时以实际配置为准。本次全局注册状态布局未变,无需为此清空整个 /usr/local/hami-shared-region 目录。
  • 检查节点和自定义启动参数。 软切分节点需提供可执行的 npu-smi,供插件设置 device-share。自定义 daemonSet.args 会覆盖整个默认数组;如需采用新日志级别,在原参数列表中补充 --v=4。只有需要恢复周期清理时才显式开启对应开关。
  • 按采集方式启用监控。 设置 vnpuMonitor.enabled=true 后,ServiceMonitor 和 PrometheusRule 默认创建在 monitoring 命名空间,标签 release 默认是 prometheus;需预先具备该命名空间和 Prometheus Operator CRD,并使对象标签符合实际选择器。没有 Operator 时,将 vnpuMonitor.serviceMonitor.create=false、vnpuMonitor.prometheusRule.create=false,保留 Service 自行采集。原先自行采集硬切分节点 :9395/metrics 物理卡指标的部署,需要调整采集方案;启用 Chart 的监控开关不能恢复该端点。
  • 核对业务指标标签。 内置 ServiceMonitor 未设置 honorLabels,且会把采集目标的 pod、namespace 写入 exported_pod、exported_namespace,可能覆盖业务工作负载标识。依赖业务维度查询时,可关闭 Chart 创建 ServiceMonitor,自行维护采集配置:设置 honorLabels: true,并去掉这两条写入 exported_* 的重标记规则。还应检查已有同名 kantaloupe_* 记录规则,避免重复定义。

自定义看板、告警和 PromQL 需按下表迁移指标名称;旧名没有并行保留。

旧指标本版对应项
vnpu_host_memory_used_byteshami_host_gpu_memory_used_bytes
vnpu_host_utilization_ratiohami_host_gpu_utilization_ratio
vnpu_vgpu_memory_used_byteshami_vgpu_memory_used_bytes
vnpu_vgpu_memory_limit_byteshami_vgpu_memory_limit_bytes
vnpu_container_device_utilization_ratiohami_container_device_utilization_ratio
vnpu_host_memory_total_bytes已删除,无同源替代项
vnpu_container_last_kernel_elapsed_seconds已删除,无同源替代项

查看Chart 与 appVersion 对应关系或软件中心。

Values 说明​

以下参数说明取自 Chart 0.1.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.
fullnameOverridestring""Override the fully qualified resource name.
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"v1.4.0"Container image tag.
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.