Dynamia ascend-device-plugin Chart 0.2.1
发布时间:2026-09-04
| 版本 | 上一版 | 本版 |
|---|---|---|
| Chart | 0.2.0 | 0.2.1 |
| appVersion | v1.4.0 | v1.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 为准。
展开参数表
| 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. |
| fullnameOverride | string | "" | Override the fully qualified resource name. |
| 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 | "v1.4.1" | Container image tag. |
| 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. |