跳到主要内容

Dynamia ascend-device-plugin Chart 0.2.1

发布时间:2026-09-04

版本上一版本版
Chart0.2.00.2.1
appVersionv1.4.0v1.4.1

HAMi Enterprise 兼容性​

功能或模式最低可用 HAMi Enterprise 版本本版配套要求与升级结论
模板化硬切分,复用 Enterprise 设备配置v2.9.0-rc0沿用共享设备配置及模板分配接口,本次无需升级 Enterprise。
hami-core 静态软切分v2.9.0-rc0显式设置 huawei.com/vnpu-mode: hami-core,并保证旧调度器注入的 PostStart 能正常执行,或由工作负载已有的有效 PostStart 避免该注入。满足这些条件时,无需因本次插件升级而升级 Enterprise。
静态软切分,且无需旧 PostStart 启动钩子v2.10.0-r2该版本移除了旧钩子;容器无法执行旧钩子、且不提供自定义 PostStart 时,需先升级 Enterprise。

版本变化​

应用变化​

  • [企业版特性] 随附的 libvnpu v1.4.1 将显存额度检查和用量记账改为按设备处理。容器使用多张 NPU 时,各卡分别计算已用显存;释放显存按最初分配的设备归还额度,避免切换当前设备后扣错账。rtMemGetInfoEx 按当前设备返回虚拟显存信息。
  • [企业版特性] 修复显存记账中的并发覆盖问题:分配前预留额度,分配失败时回退,进程退出后按设备清理遗留用量;停止用后台 DCMI 快照覆盖分配和释放账本。
  • [企业版特性] 改善 /etc/ld.so.preload 注入的兼容性。运行库不再在普通程序加载时强制链接 CANN runtime 和 DCMI 库,相关符号延迟到实际使用时解析;同时移除预加载阶段的日志初始化和全局 sigaction 拦截。
  • [企业版特性] 容器内 npu-smi info 等 DSMI/DCMI 显存查询改用只读共享内存视图,查询本身不启动限流管理线程、不初始化 CANN runtime,也不创建状态文件。显存仍展示容器额度和跟踪用量;计算利用率查询改为透传驱动结果,不再按容器算力份额换算。
  • [企业版特性] 插件监控同时识别 libvnpu v1.4.0 和 v1.4.1 的本地共享内存布局,修复新版布局下显存用量、进程槽位和活跃工作线程的读取。容器总用量汇总各设备计数,逐设备用量继续分别读取。

升级说明​

  • 按现有软切分启动条件选择 Enterprise 配套。 本版没有新增必须整体升级 Enterprise 的接口要求。旧调度器会为未配置 PostStart 的 hami-core 容器注入 bash 启动命令;容器缺少 bash 时会导致钩子失败。可保留已有有效 PostStart;需要免除这一旧启动依赖时,先升级 Enterprise 至 v2.10.0-r2。这一限制在上一版插件中已存在。
  • 在更新软切分运行库前停止受影响工作负载。 libvnpu v1.4.1 改变了容器本地共享内存布局。插件能够读取旧文件,不代表新旧运行库能够共用该文件。先停止升级节点上使用旧运行库的软切分工作负载并确认进程退出,再更新插件;仅滚动插件不能完成工作负载迁移。模板化硬切分不使用这套运行库状态。
  • 使用新建的容器本地状态。 默认 NPU_LOCAL_SHM_PATH=/hami-vnpu-shmem/vnpu_local_shmem,对应宿主机 /usr/local/hami-vnpu-core/containers/<Pod UID>_<容器名>/vnpu_local_shmem。升级插件后重新创建软切分 Pod,让插件生成新的容器目录;不要把旧文件复制到新目录。如自定义了 NPU_LOCAL_SHM_PATH、HOOK_PATH 或挂载,应先据实际配置定位文件,确认全部使用者退出后,再清理旧文件或改用全新路径。不要清理仍被进程使用的文件。本次全局共享内存布局未变,不要求清空整个 /usr/local/hami-shared-region。
  • 确认运行库和镜像实际更新。 本版默认镜像为 ghcr.io/dynamia-ai/ascend-device-plugin:v1.4.1,包含 libvnpu v1.4.1。插件启动后确认宿主机 /usr/local/hami-vnpu-core/libvnpu.so 已更新,再启动新工作负载。自定义 image.tag 时更新到目标版本;设置了 image.digest 时需更新为目标摘要或清空该值,因为摘要优先于标签。Chart 不新增配置项。

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

Values 说明​

以下参数说明取自 Chart 0.2.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.1"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.