华为昇腾310p编译安装出现CANN版本不匹配的问题
环境
- 【FastDeploy版本】: 编译安装develop分支
- 【编译命令】cmake -DWITH_ASCEND=ON -DCMAKE_INSTALL_PREFIX=fastdeploy-ascend -DENABLE_VISION=ON ..
- 【系统平台】: Linux worker-12 4.19.90-23.8.v2101.ky10.x86_64
- 【硬件】: Ascend 310I Pro(310P3)
- 【编译语言】:Python 3.10
- 【CANN版本】:CANN 6.4.12.1.241:6.3.RC2
- 【npu 驱动版本】:Version: 23.0.rc2
问题日志及出现问题的操作流程
- 【模型跑不通】 -- 首先编译安装Paddle-Lite,编译命令:$./lite/tools/build_linux.sh --arch=x86 --with_extra=ON --with_log=ON --with_exception=ON --with_nnadapter=ON --nnadapter_with_huawei_ascend_npu=ON --nnadapter_huawei_ascend_npu_sdk_root=/usr/local/Ascend/ascend-toolkit/latest full_publish -- 修改FastDeploy/cmake/paddlelite.cmake中的内容:set(PADDLELITE_DIRECTORY /home/xxx/Paddle-Lite/build.lite.linux.x86.gcc/inference_lite_lib/cxx CACHE PATH "Directory of custom Paddle-Lite library")设置为编译好的Paddle-Lite库 -- 根据示例进行C++和python编译安装Fastdeploy(https://github.com/PaddlePaddle/FastDeploy/blob/develop/docs/cn/build_and_install/huawei_ascend.md) -- 运行example示例(https://github.com/PaddlePaddle/FastDeploy/blob/develop/examples/vision/detection/paddledetection/python/README_CN.md) -- 执行命令:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/xxx/Paddle-Lite/build.lite.linux.x86.gcc/inference_lite_lib/third_party/mklml/lib/
python infer_ppyoloe.py --model_dir ppyoloe_crn_l_300e_coco --image 000000014439.jpg --device ascend
无法完成昇腾芯片中的推理,错误信息如下: I1108 13:48:41.355319 730851 generate_program_pass.h:41] insts.size: 1 [INFO] fastdeploy/runtime/runtime.cc(354)::CreateLiteBackend Runtime initialized with Backend::PDLITE in Device::ASCEND. [W 11/ 8 13:48:41.490 .../src/driver/huawei_ascend_npu/utility.cc:57 InitializeAscendCL] CANN version mismatch. The build version is 0.0.0, but the current environment version is 6.3.2. [I 11/ 8 13:48:41.677 ...r/src/driver/huawei_ascend_npu/engine.cc:42 Context] properties: [I 11/ 8 13:48:41.677 ...r/src/driver/huawei_ascend_npu/engine.cc:67 Context] selected device ids: [I 11/ 8 13:48:41.677 ...r/src/driver/huawei_ascend_npu/engine.cc:69 Context] 0 [I 11/ 8 13:48:41.677 ...r/src/driver/huawei_ascend_npu/engine.cc:79 Context] profiling path: [I 11/ 8 13:48:41.677 ...r/src/driver/huawei_ascend_npu/engine.cc:89 Context] dump model path: [I 11/ 8 13:48:41.677 ...r/src/driver/huawei_ascend_npu/engine.cc:99 Context] precision mode: [I 11/ 8 13:48:41.677 ...r/src/driver/huawei_ascend_npu/engine.cc:121 Context] op select impl mode: [I 11/ 8 13:48:41.677 ...r/src/driver/huawei_ascend_npu/engine.cc:131 Context] op type list for impl mode: [I 11/ 8 13:48:41.677 ...r/src/driver/huawei_ascend_npu/engine.cc:141 Context] enable compressw weight: [I 11/ 8 13:48:41.677 ...r/src/driver/huawei_ascend_npu/engine.cc:151 Context] auto tune mode: [I 11/ 8 13:48:41.677 ...r/src/driver/huawei_ascend_npu/engine.cc:161 Context] enable dynamic shape range: [I 11/ 8 13:48:41.677 ...r/src/driver/huawei_ascend_npu/engine.cc:177 Context] initial buffer length of dynamic shape range: -1 [W 11/ 8 13:48:41.678 ...ter/nnadapter/src/runtime/compilation.cc:334 Finish] Warning: Failed to create a program, No model and cache is provided. W1108 13:48:41.678025 730851 engine.cc:149] Warning: Build model failed(3) ! [W 11/ 8 13:48:41.693 ...nnadapter/nnadapter/src/runtime/model.cc:86 GetSupportedOperations] Warning: Failed to get the supported operations for device 'huawei_ascend_npu', because the HAL interface 'validate_program' is not implemented! W1108 13:48:41.693092 730851 converter.cc:171] Warning: Failed to get the supported operations for the selected devices, one or more of the selected devices are not supported! [I 11/ 8 13:48:41.693 ...r/src/driver/huawei_ascend_npu/driver.cc:70 CreateProgram] Create program for huawei_ascend_npu. [F 11/ 8 13:48:42.749 .../src/driver/huawei_ascend_npu/utility.cc:315 BuildOMModelToBuffer] Check failed: (reinterpret_castge::graphStatus(aclgrphBuildModel(ir_graph, options, om_buffer)) == ge::GRAPH_SUCCESS): 1343266818!==0 1343266818 Unknown ATC error code(1343266818) [F 11/ 8 13:48:42.749 .../src/driver/huawei_ascend_npu/utility.cc:315 BuildOMModelToBuffer] Check failed: (reinterpret_castge::graphStatus(aclgrphBuildModel(ir_graph, options, om_buffer)) == ge::GRAPH_SUCCESS): 1343266818!==0 1343266818 Unknown ATC error code(1343266818)
[F 11/ 8 13:48:42.854 ...ter/nnadapter/src/runtime/compilation.cc:98 ~Program] Check failed: device_context: No device found. [F 11/ 8 13:48:42.854 ...ter/nnadapter/src/runtime/compilation.cc:98 ~Program] Check failed: device_context: No device found.
已放弃 (核心已转储)
遇到同样的问题,我的CANN用的6.0.1,npu22.0.4,自己编译的paddle-lite,编译Fastdeploy1.0.7后demo报同样的错
请问有人解决这个问题吗
遇到同样的问题 请问能否解决下
310p不应该是aarch64吗,你选的x86
310p不应该是aarch64吗,你选的x86
这个310p设备使用的【系统平台】: Linux worker-12 4.19.90-23.8.v2101.ky10.x86_64