编译mindspore-lite报错

问题描述

参考 编译云侧MindSpore Lite — MindSpore Lite master 文档 中的编译步骤,编译npu版本的python的whl包失败。

报错信息如下

-- Compile minddata in [full] mode
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- CMAKE_CURRENT_BINARY_DIR=/root/work/lishuang_project/mindspore_ubuntu2004/mindspore/lite/build/tools/kernel_builder/ascend/tbe_and_aicpu
-- CMAKE_CURRENT_SOURCE_DIR=/root/work/lishuang_project/mindspore_ubuntu2004/mindspore/lite/tools/kernel_builder/ascend/tbe_and_aicpu
-- ASCEND_TENSOR_COMPILER_INCLUDE=/usr/local/Ascend/latest/include
-- SYSTEM_NAME=ubuntu
-- SYSTEM_INFO=ubuntu_aarch64
-- RUN_TARGET=custom_opp_ubuntu_aarch64.run
-- OUT_DIR=/root/work/lishuang_project/mindspore_ubuntu2004/mindspore/lite/build/tools/kernel_builder/ascend/tbe_and_aicpu/makepkg
-- OP_COMMON_INC=
-- OP_PROTO_TARGET=cust_op_proto
-- OUTPUT_FILES=aic-ascend310-ops-info.json;aic-ascend310p-ops-info.json;aic-ascend910-ops-info.json;aic-ascend910b-ops-info.json
-- operation system is Linux
-- AICPU_CONFIG_INFO_FLAG=
-- ALL_MODULES=cust_op_proto;config_json
RUN_TARGET custom_opp_ubuntu_aarch64.run
-- Opbuild generating sources
build ops lib info: 
build ops lib error: /usr/bin/ld: cannot find -lexe_graph
/usr/bin/ld: cannot find -lregister
/usr/bin/ld: cannot find -ltiling_api
collect2: error: ld returned 1 exit status

CMake Error at tools/kernel_builder/ascend/ascendc/cmake/func.cmake:42 (message):
  opbuild run failed!
Call Stack (most recent call first):
  tools/kernel_builder/ascend/ascendc/op_host/CMakeLists.txt:21 (opbuild)


-- Configuring incomplete, errors occurred!
See also "/root/work/lishuang_project/mindspore_ubuntu2004/mindspore/lite/build/CMakeFiles/CMakeOutput.log".
See also "/root/work/lishuang_project/mindspore_ubuntu2004/mindspore/lite/build/CMakeFiles/CMakeError.log".

环境配置

  • cpu:鲲鹏920
  • npu:昇腾910b
  • 系统:ubuntu22.04
  • gcc:7.5.0
  • cann:8.0.RC2
  • mindspore版本:2.2

根据报错信息,是库文件找不到,但查找/usr/local/Ascend 路径下,存在需要的库文件。 请问如何解决该问题,让编译成功

问题解答

CMake Error at tools/kernel_builder/ascend/ascendc/cmake/func.cmake:42 (message):
  opbuild run failed!
Call Stack (most recent call first):
  tools/kernel_builder/ascend/ascendc/op_host/CMakeLists.txt:21 (opbuild)

这里信息提示cann没有完整安装,建议您再完整安装下试一试。CANN的安装请参考此文档https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/80RC2alpha002/softwareinst/instg/instg_0001.html

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值