已关闭
[Requirement|需求建议]: 业务插件支持版本管理 #542
liu-lu创建于 5月23日关闭于 5月28日
liu-lu
5月25日 评论:
5月25日 评论:
验证:runtime包install 后有cann-tsch-compat.ini生成;uninstall 后cann-tsch-compat.ini被删除
(base) root@910b:/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend# ./cann-npu-runtime_linux-x86_64.run --full --install-path=/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend/
Verifying archive integrity... 100% SHA256 checksums are OK. All good.
Uncompressing CANN_NPU-RUNTIME_RUN_PACKAGE 100%
[Runtime] [2026-05-25 07:29:09] [INFO]: Start time:2026-05-25 07:29:09
[Runtime] [2026-05-25 07:29:09] [INFO]: LogFile:/var/log/ascend_seclog/ascend_install.log
[Runtime] [2026-05-25 07:29:09] [INFO]: InputParams:--full --install-path=/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend/
[Runtime] [2026-05-25 07:29:09] [INFO]: OperationLogFile:/var/log/ascend_seclog/operation.log
[Runtime] [2026-05-25 07:29:09] [INFO]: Check version matched!
[Runtime] [2026-05-25 07:29:09] [INFO]: parent_dir value is [/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64] and children_dir value is [ascend]
[Runtime] [2026-05-25 07:29:09] [INFO]: [ascend] belongs to root.
[Runtime] [2026-05-25 07:29:09] [INFO]: [ascend] permission is ok.
[Runtime] [2026-05-25 07:29:09] [INFO]: parent_dir value is [/home/liulu/pkg/Decompress_run_package] and children_dir value is [cann-npu-runtime_9.0.0_linux-x86_64]
[Runtime] [2026-05-25 07:29:09] [INFO]: [cann-npu-runtime_9.0.0_linux-x86_64] belongs to root.
[Runtime] [2026-05-25 07:29:09] [INFO]: [cann-npu-runtime_9.0.0_linux-x86_64] permission is ok.
[Runtime] [2026-05-25 07:29:09] [INFO]: parent_dir value is [/home/liulu/pkg] and children_dir value is [Decompress_run_package]
[Runtime] [2026-05-25 07:29:09] [INFO]: [Decompress_run_package] belongs to root.
[Runtime] [2026-05-25 07:29:09] [INFO]: [Decompress_run_package] permission is ok.
[Runtime] [2026-05-25 07:29:09] [INFO]: parent_dir value is [/home/liulu] and children_dir value is [pkg]
[Runtime] [2026-05-25 07:29:09] [INFO]: [pkg] belongs to root.
[Runtime] [2026-05-25 07:29:09] [INFO]: [pkg] permission is ok.
[Runtime] [2026-05-25 07:29:09] [INFO]: parent_dir value is [/home] and children_dir value is [liulu]
[Runtime] [2026-05-25 07:29:09] [INFO]: [liulu] belongs to root.
[Runtime] [2026-05-25 07:29:09] [INFO]: [liulu] permission is ok.
[Runtime] [2026-05-25 07:29:09] [INFO]: parent_dir value is [/] and children_dir value is [home]
[Runtime] [2026-05-25 07:29:09] [INFO]: [home] belongs to root.
[Runtime] [2026-05-25 07:29:09] [INFO]: [home] permission is ok.
[Runtime] [2026-05-25 07:29:09] [INFO]: parent_dir value is [/] and children_dir value is [/]
[Runtime] [2026-05-25 07:29:09] [INFO]: parent_dirs_permission_check succeeded
[Runtime] [2026-05-25 07:29:09] [INFO]: install /home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend full
[Runtime] [2026-05-25 07:29:09] [INFO]: step into run_runtime_install.sh ......
[Runtime] [2026-05-25 07:29:09] [INFO]: install target dir /home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend/cann, type full.
[Runtime] [2026-05-25 07:29:09] [INFO]: runtime install upgradePercentage:10%
[Runtime] [2026-05-25 07:29:10] [INFO]: runtime install upgradePercentage:100%
[Runtime] [2026-05-25 07:29:10] [INFO]: Upgrade base version successfully!
[Runtime] [2026-05-25 07:29:10] [INFO]: Runtime package installed successfully! The new version takes effect immediately.
Please make sure that
- LD_LIBRARY_PATH includes /home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend/cann/runtime/lib64
[Runtime] [2026-05-25 07:29:10] [INFO]: End time:2026-05-25 07:29:10
(base) root@910b:/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend# ll cann
cann/ cann-npu-runtime_linux-x86_64.run
(base) root@910b:/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend# ll cann/
bin/ compat/ devlib/ lib64/ runtime/ share/ x86_64-linux/
cann_uninstall.sh conf/ include/ pkg_inc/ set_env.sh var/
(base) root@910b:/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend# ll cann/compat/
total 5148
dr-xr-xr-x 2 root root 4096 May 25 07:29 ./
drwxr-xr-x 7 root root 4096 May 25 07:29 ../
-r--r--r-- 1 root root 43 May 16 04:28 cann-tsch-compat.ini
-r--r--r-- 1 root root 5255618 May 16 04:28 cann-tsch-compat.tar.gz
(base) root@910b:/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend# ./cann-npu-runtime_linux-x86_64.run --uninstall --install-path=/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend/
Verifying archive integrity... 100% SHA256 checksums are OK. All good.
Uncompressing CANN_NPU-RUNTIME_RUN_PACKAGE 100%
[Runtime] [2026-05-25 07:29:42] [INFO]: Start time:2026-05-25 07:29:42
[Runtime] [2026-05-25 07:29:42] [INFO]: LogFile:/var/log/ascend_seclog/ascend_install.log
[Runtime] [2026-05-25 07:29:42] [INFO]: InputParams:--uninstall --install-path=/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend/
[Runtime] [2026-05-25 07:29:42] [INFO]: OperationLogFile:/var/log/ascend_seclog/operation.log
[Runtime] [2026-05-25 07:29:42] [INFO]: base version is 9.1.0.
[Runtime] [2026-05-25 07:29:42] [INFO]: parent_dir value is [/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64] and children_dir value is [ascend]
[Runtime] [2026-05-25 07:29:42] [INFO]: [ascend] belongs to root.
[Runtime] [2026-05-25 07:29:42] [INFO]: [ascend] permission is ok.
[Runtime] [2026-05-25 07:29:42] [INFO]: parent_dir value is [/home/liulu/pkg/Decompress_run_package] and children_dir value is [cann-npu-runtime_9.0.0_linux-x86_64]
[Runtime] [2026-05-25 07:29:42] [INFO]: [cann-npu-runtime_9.0.0_linux-x86_64] belongs to root.
[Runtime] [2026-05-25 07:29:42] [INFO]: [cann-npu-runtime_9.0.0_linux-x86_64] permission is ok.
[Runtime] [2026-05-25 07:29:42] [INFO]: parent_dir value is [/home/liulu/pkg] and children_dir value is [Decompress_run_package]
[Runtime] [2026-05-25 07:29:42] [INFO]: [Decompress_run_package] belongs to root.
[Runtime] [2026-05-25 07:29:42] [INFO]: [Decompress_run_package] permission is ok.
[Runtime] [2026-05-25 07:29:42] [INFO]: parent_dir value is [/home/liulu] and children_dir value is [pkg]
[Runtime] [2026-05-25 07:29:42] [INFO]: [pkg] belongs to root.
[Runtime] [2026-05-25 07:29:42] [INFO]: [pkg] permission is ok.
[Runtime] [2026-05-25 07:29:42] [INFO]: parent_dir value is [/home] and children_dir value is [liulu]
[Runtime] [2026-05-25 07:29:42] [INFO]: [liulu] belongs to root.
[Runtime] [2026-05-25 07:29:42] [INFO]: [liulu] permission is ok.
[Runtime] [2026-05-25 07:29:42] [INFO]: parent_dir value is [/] and children_dir value is [home]
[Runtime] [2026-05-25 07:29:42] [INFO]: [home] belongs to root.
[Runtime] [2026-05-25 07:29:42] [INFO]: [home] permission is ok.
[Runtime] [2026-05-25 07:29:42] [INFO]: parent_dir value is [/] and children_dir value is [/]
[Runtime] [2026-05-25 07:29:42] [INFO]: parent_dirs_permission_check succeeded
[Runtime] [2026-05-25 07:29:42] [INFO]: uninstall /home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend full
[Runtime] [2026-05-25 07:29:42] [INFO]: step into run_runtime_uninstall.sh ......
[Runtime] [2026-05-25 07:29:42] [INFO]: uninstall target dir /home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend/cann, type full.
[Runtime] [2026-05-25 07:29:43] [INFO]: Runtime package uninstalled successfully! Uninstallation takes effect immediately.
[Runtime] [2026-05-25 07:29:43] [INFO]: End time:2026-05-25 07:29:43
(base) root@910b:/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend# pwd
/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend
(base) root@910b:/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend# ll
total 35840
drwxr-xr-x 2 root root 4096 May 25 07:29 ./
drwxr-xr-x 5 root root 4096 May 25 07:25 ../
-rwxr-xr-x 1 root root 36691313 May 25 07:25 cann-npu-runtime_linux-x86_64.run*
(base) root@910b:/home/liulu/pkg/Decompress_run_package/cann-npu-runtime_9.0.0_linux-x86_64/ascend#


5月28日 添加了label:resolved
Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.
Backgroud(背景信息)
业务插件支持版本管理
Origin(信息来源)
Benefit / Necessity (价值/作用)
一个devcie侧同一时刻只能存在一套业务插件,多个用户安装了不同的cann包使用同一个devcie时,支持业务插件按版本号升序升级。避免老版业务插件替换了新版本业务插件导致功能回退。
Design(设计方案)
一、业务插件中需要支持版本号
1、版本号配置文件名称:配置文件名称跟业务插件包名称相同,如cann-tsch-compat.tar.gz包对应的配置文件是cann--tsch-compat.ini
2、版本号的生成规则:业务插件的版本号以及时间戳跟所在子包保持一致,生成业务插件版本号时将预发布版本号(alpha/beta/rc)删除
举例:cann--tsch-compat.tar.gz在hcomm包中,runtime.run包的版本号8.5.0-alpha.1,则对应的compat版本号是8.5.0。runtime.run包的版本号8.6.0,则对应的compat版本号是8.6.0。
3、compat配置文件内容示例:
version=8.5.0
timestamp=20260114_115609804
二、业务插件版本号配置文件打包规则
在业务插件所在的子包以及业务插件压缩tar包中各打包一份版本号配置文件cann-xx-compat.ini。stedevice阶段在host上判断是否需要加载软件。