PaddlePaddle / PaddlePaddle/FastDeploy

Build failed on jetson nano with paddle inference backend.

Open
#2,032 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.7k
Forks
756
Avg merge
19h 28m
Merged PRs (30d)
4

Description

Environment

OS Platform: e.g. Linux x64 aarch64 - Jetson Nano - Ubuntu 18.04.6
Hardware: e.g. Jetson Nano CUDA 10.2 CUDNN 8.2.1
Program Language: e.g. Python 3.6.9

Problem description

Hi, I followed this link to build fastdeploy library on jetson nano with Jetpack 4.6.1 image. I'm able to install the library with ENABLE_PADDLE_BACKEND=OFF, and able to run the code infer.py with device cpu and get the results. But I want to run it on GPU. So, I downloaded the pre-built paddle inference library from here - https://www.paddlepaddle.org.cn/inference/v2.4/guides/install/download_lib.html and extracted it and set the folder on PADDLEINFERENCE_DIRECTORY. But when I try to build the package for Python, I get below issue:

[ 23%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/utils/utils.cc.o
[ 24%] Building CUDA object CMakeFiles/fastdeploy.dir/fastdeploy/function/cuda_cast.cu.o
[ 24%] Building CUDA object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/common/cuda/adaptive_pool2d_kernel.cu.o
[ 24%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/ort/ops/adaptive_pool2d.cc.o
[ 25%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/ort/ops/multiclass_nms.cc.o
[ 25%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/ort/ort_backend.cc.o
[ 25%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/ort/utils.cc.o
[ 25%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/paddle/paddle_backend.cc.o
/home/kamerai/Documents/fd/FastDeploy/fastdeploy/runtime/backends/paddle/paddle_backend.cc: In member function ‘void fastdeploy::PaddleBackend::BuildOption(const fastdeploy::PaddleBackendOption&)’:
/home/kamerai/Documents/fd/FastDeploy/fastdeploy/runtime/backends/paddle/paddle_backend.cc:53:15: error: ‘using Config = struct paddle::AnalysisConfig {aka struct paddle::AnalysisConfig}’ has no member named ‘Exp_EnableUseCutlass’
config_.Exp_EnableUseCutlass();
^~~~~~~~~~~~~~~~~~~~
/home/kamerai/Documents/fd/FastDeploy/fastdeploy/runtime/backends/paddle/paddle_backend.cc: In member function ‘bool fastdeploy::PaddleBackend::InitFromPaddle(const string&, const string&, bool, const fastdeploy::PaddleBackendOption&)’:
/home/kamerai/Documents/fd/FastDeploy/fastdeploy/runtime/backends/paddle/paddle_backend.cc:293:36: error: ‘using element_type = class paddle_infer::Predictor {aka class paddle_infer::Predictor}’ has no member named ‘GetOutputTypes’; did you mean ‘GetInputTypes’?
auto output_dtypes = predictor_->GetOutputTypes();
^~~~~~~~~~~~~~
GetInputTypes
/home/kamerai/Documents/fd/FastDeploy/fastdeploy/runtime/backends/paddle/paddle_backend.cc:294:35: error: ‘using element_type = class paddle_infer::Predictor {aka class paddle_infer::Predictor}’ has no member named ‘GetInputTensorShape’; did you mean ‘GetInputTypes’?
auto input_shapes = predictor_->GetInputTensorShape();
^~~~~~~~~~~~~~~~~~~
GetInputTypes
/home/kamerai/Documents/fd/FastDeploy/fastdeploy/runtime/backends/paddle/paddle_backend.cc:295:36: error: ‘using element_type = class paddle_infer::Predictor {aka class paddle_infer::Predictor}’ has no member named ‘GetOutputTensorShape’; did you mean ‘GetOutputHandle’?
auto output_shapes = predictor_->GetOutputTensorShape();
^~~~~~~~~~~~~~~~~~~~
GetOutputHandle
CMakeFiles/fastdeploy.dir/build.make:579: recipe for target 'CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/paddle/paddle_backend.cc.o' failed
make[2]: *** [CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/paddle/paddle_backend.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Kindly help fix the issue. I need to run PaddleOCR on Jetson Nano with GPU support.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Jetson build guide and fastdeploy/runtime/backends/paddle/paddle_backend.cc, then reproduce the Python package build using ENABLE_PADDLE_BACKEND and PADDLEINFERENCE_DIRECTORY. Check the reported AnalysisConfig and Predictor API errors against the downloaded Paddle inference library. Done means the package builds with the Paddle backend enabled and the GPU inference example runs on the Jetson Nano.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, python, ubuntu
Domain
backend, build-system, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.