PaddlePaddle / FastDeploy

⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
https://www.paddlepaddle.org.cn/fastdeploy
Apache License 2.0
3k stars 465 forks source link

jetson nano部署python环境报错 #2110

Closed LXXIANG12 closed 3 months ago

LXXIANG12 commented 1 year ago

image 按照以上官方教程编译报错: image 环境:jetpack=4.6.1 cmake=3.26.4 gcc=7.3.1 python=3.10

jiangjiajun commented 1 year ago

拉一下这个PR的最新代码 https://github.com/PaddlePaddle/FastDeploy/pull/2112

编译时打开BUILD_PADDLE2ONNX=ON

bianyiJetsonnano commented 1 year ago

你好,也是nano、开启了BUILD_PADDLE2ONNX=ON 、最新develop的 版本, 编译fd 报错,帮看下,怎么处理呢?:

image image

------- 详细 编译过程的打印:------ 。。。 -- CUDA compiler: /usr/local/cuda/bin/nvcc, version: NVIDIA 10.2.300 -- CUDA detected: 10.2.300 -- NVCC_FLAGS_EXTRA: -gencode arch=compute_53,code=sm_53 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_72,code=sm_72 -- Use the opencv lib specified by user. The OpenCV path: /usr/lib/aarch64-linux-gnu/cmake/opencv4/ Decompress file /home/nvidia/FastDeploy-develop/python/.setuptools-cmake-build/protobuf-linux-3.16.0.tgz ... Generated: /home/nvidia/FastDeploy-develop/python/.setuptools-cmake-build/third_party/onnx/onnx/onnx_paddle2onnx-ml.proto Generated: /home/nvidia/FastDeploy-develop/python/.setuptools-cmake-build/third_party/onnx/onnx/onnx-operators_paddle2onnx-ml.proto Generated: /home/nvidia/FastDeploy-develop/python/.setuptools-cmake-build/third_party/onnx/onnx/onnx-data_paddle2onnx.proto

-- **** Summary **** -- CMake version : 3.26.4 -- CMake command : /home/nvidia/cmake/cmake-3.26.4-linux-aarch64/bin/cmake -- System : Linux -- C++ compiler : /usr/bin/c++ -- C++ compiler version : 7.5.0 -- CXX flags : -Wno-format -g0 -O3 -Wnon-virtual-dtor -- Build type : Release -- Compile definitions : _GLIBCXX_USE_CXX11_ABI=1;FASTDEPLOY_LIB;CMAKE_BUILD_TYPE=Release;ENABLE_ORT_BACKEND;ENABLE_PADDLE_BACKEND;PAD DLEINFERENCE_API_COMPAT_DEV;WITH_GPU;ENABLE_TRT_BACKEND;ENABLE_VISION;ENABLE_PADDLE2ONNX;MAX_ONNX_OPSET_VERSION=16;PADDLE2ONNX_LIB;ONNX_NAMESP ACE=paddle2onnx;__STDC_FORMAT_MACROS -- CMAKE_PREFIX_PATH : -- CMAKE_INSTALL_PREFIX : /usr/local -- CMAKE_MODULE_PATH :

-- ONNX version : 1.11.0 -- ONNX NAMESPACE : paddle2onnx -- ONNX_USE_LITE_PROTO : OFF -- USE_PROTOBUF_SHARED_LIBS : OFF -- Protobuf_USE_STATIC_LIBS : ON -- ONNX_DISABLE_EXCEPTIONS : OFF -- ONNX_WERROR : OFF -- ONNX_BUILD_TESTS : OFF -- ONNX_BUILD_BENCHMARKS : OFF -- ONNXIFI_DUMMY_BACKEND : OFF -- ONNXIFI_ENABLE_EXT : OFF

-- Protobuf compiler : /usr/bin/protoc -- Protobuf includes : /usr/include -- Protobuf libraries : /usr/lib/aarch64-linux-gnu/libprotobuf.a;-lpthread -- BUILD_ONNX_PYTHON : OFF

-- *****FastDeploy Building Summary** -- CMake version : 3.26.4 -- CMake command : /home/nvidia/cmake/cmake-3.26.4-linux-aarch64/bin/cmake -- System : Linux -- C++ compiler : /usr/bin/c++ -- C++ standard : 11 -- C++ cuda standard : 11 -- C++ compiler version : 7.5.0 -- CXX flags : -Wno-format -g0 -O3 -- EXE linker flags : -- Shared linker flags : -- Build type : Release -- Compile definitions : _GLIBCXX_USE_CXX11_ABI=1;FASTDEPLOY_LIB;CMAKE_BUILD_TYPE=Release;ENABLE_ORT_BACKEND;ENABLE_PADDLE_BACKEND;PAD DLEINFERENCE_API_COMPAT_DEV;WITH_GPU;ENABLE_TRT_BACKEND;ENABLE_VISION;ENABLE_PADDLE2ONNX;MAX_ONNX_OPSET_VERSION=16;PADDLE2ONNX_LIB;ONNX_NAMESP ACE=paddle2onnx -- CMAKE_PREFIX_PATH : -- CMAKE_INSTALL_PREFIX : /usr/local -- CMAKE_MODULE_PATH :

-- FastDeploy version : 0.0.0 -- ENABLE_ORT_BACKEND : ON -- ENABLE_RKNPU2_BACKEND : OFF -- ENABLE_HORIZON_BACKEND : OFF -- ENABLE_SOPHGO_BACKEND : OFF -- ENABLE_PADDLE_BACKEND : ON -- ENABLE_LITE_BACKEND : OFF -- ENABLE_POROS_BACKEND : OFF -- ENABLE_TRT_BACKEND : ON -- ENABLE_OPENVINO_BACKEND : OFF -- ENABLE_TVM_BACKEND : OFF -- ENABLE_BENCHMARK : OFF -- ENABLE_VISION : ON -- ENABLE_TEXT : OFF -- ENABLE_ENCRYPTION : OFF -- ENABLE_FLYCV : OFF -- ENABLE_CVCUDA : OFF -- WITH_GPU : ON -- WITH_IPU : OFF -- WITH_OPENCL : OFF -- WITH_TESTING : OFF -- WITH_ASCEND : OFF -- WITH_DIRECTML : OFF -- WITH_TIMVX : OFF -- WITH_KUNLUNXIN : OFF -- WITH_CAPI : OFF -- WITH_CSHARPAPI : OFF -- ONNXRuntime version : 1.12.0 -- Paddle Inference version : 0.0.0 -- PADDLE_WITH_ENCRYPT : OFF -- PADDLE_WITH_AUTH : OFF -- CUDA_DIRECTORY : /usr/local/cuda -- TRT_DRECTORY : /home/nvidia/FastDeploy-develop/python/.setuptools-cmake-build/UNDEFINED -- Python executable : /home/nvidia/mambaforge/bin/python -- Python includes : /home/nvidia/mambaforge/include/python3.10 -- Configuring done (292.1s) -- Generating done (0.8s) -- Build files have been written to: /home/nvidia/FastDeploy-develop/python/.setuptools-cmake-build ['/home/nvidia/cmake/cmake-3.26.4-linux-aarch64/bin/cmake', '--build', '.', '--', '-j', '4']

[ 1%] Built target gen_onnx_proto [ 1%] Built target extern_onnxruntime [ 7%] Built target yaml-cpp [ 8%] Built target gen_onnx_data_proto [ 8%] Built target onnxifi_dummy [ 8%] Built target gen_onnx_operators_proto [ 9%] Built target yaml-cpp-sandbox [ 10%] Built target yaml-cpp-parse [ 10%] Built target yaml-cpp-read [ 12%] Built target onnx_proto [ 13%] Built target onnxifi_loader [ 13%] Built target p2o_paddle_proto [ 13%] Built target onnxifi_wrapper [ 13%] Building CXX object third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/sequence/defs.cc.o [ 13%] Building CXX object third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/tensor/utils.cc.o [ 13%] Building CXX object third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/tensor_proto_util.cc.o [ 13%] Building CXX object third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/tensor/old.cc.o /home/nvidia/FastDeploy-develop/third_party/onnx/onnx/defs/sequence/defs.cc: In function ‘bool paddle2onnx::BuildSequenceMapBodyFunc(const pad dle2onnx::FunctionBodyBuildContext&, const paddle2onnx::OpSchema&, paddle2onnx::FunctionProto&)’: /home/nvidia/FastDeploy-develop/third_party/onnx/onnx/defs/sequence/defs.cc:809:40: error: no match for ‘operator[]’ (operand types are ‘googl e::protobuf::RepeatedPtrField’ and ‘int’) seq_at_node.add_output(g_inputs[inputIndex].name()); ^ /home/nvidia/FastDeploy-develop/third_party/onnx/onnx/defs/sequence/defs.cc:817:37: error: no match for ‘operator[]’ (operand types are ‘googl e::protobuf::RepeatedPtrField’ and ‘int’) identity.add_output(g_inputs[inputIndex].name()); ^ /home/nvidia/FastDeploy-develop/third_party/onnx/onnx/defs/sequence/defs.cc:877:30: error: no match for ‘operator[]’ (operand types are ‘googl e::protobuf::RepeatedPtrField’ and ‘int’) int64_t dtype = g_outputs[outputIndex].type().tensor_type().elem_type(); ^ third_party/onnx/CMakeFiles/onnx.dir/build.make:523: recipe for target 'third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/sequence/defs.cc.o' fai led make[2]: ** [third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/sequence/defs.cc.o] Error 1 make[2]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:597: recipe for target 'third_party/onnx/CMakeFiles/onnx.dir/all' failed make[1]: [third_party/onnx/CMakeFiles/onnx.dir/all] Error 2 Makefile:155: recipe for target 'all' failed make: [all] Error 2 Traceback (most recent call last): File "/home/nvidia/FastDeploy-develop/python/setup.py", line 445, in setuptools.setup( File "/home/nvidia/mambaforge/lib/python3.10/site-packages/setuptools/init.py", line 87, in setup return distutils.core.setup(attrs) File "/home/nvidia/mambaforge/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/home/nvidia/mambaforge/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/home/nvidia/mambaforge/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/home/nvidia/mambaforge/lib/python3.10/site-packages/setuptools/dist.py", line 1208, in run_command super().run_command(command) File "/home/nvidia/mambaforge/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/nvidia/mambaforge/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run self.run_command(cmd_name) File "/home/nvidia/mambaforge/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/home/nvidia/mambaforge/lib/python3.10/site-packages/setuptools/dist.py", line 1208, in run_command ....