跳到主要内容

如何升级工程到最新版本

工具描述

使用5.0.2.0版本DDK tools包生成的算子工程,若想用新版本的DDK tools包进行调试,需要升级算子工程,否则编译时会有如下报错。

/usr/bin/ld: cannot find -lPLATFORM-NOTFOUND: No such file or directory
// ...
CMake Error at cmake_install.cmake:78 (file):
file INSTALL cannot find
"***/build_out/libcustom_op.so":
No such file or directory.


make: *** [Makefile:100: install] Error 1

命令汇总

执行如下命令,将算子工程升级为当前工具适配的版本。其中${install_path}为ddk工具的安装目录

chmod +x ${install_path}/ddk/tools/tools_ascendc/upgrade_project.sh
${install_path}/ddk/tools/tools_ascendc/upgrade_project.sh <path>

表1 工程升级参数说明

参数名称参数描述是否必选
自定义算子工程根路径
-h,--help输出帮助信息。

例如安装目录为/usr/local/,创建的算子工程目录为/home/AddCustom,对应的命令行为:

chmod +x /usr/local/ddk/tools/tools_ascendc/upgrade_project.sh
/usr/local/ddk/tools/tools_ascendc/upgrade_project.sh /home/AddCustom