PaddleOCR icon indicating copy to clipboard operation
PaddleOCR copied to clipboard

Compling cpp libpaddle_inference.so on Ubuntu 20 failed

Open richardgohth opened this issue 11 months ago • 12 comments

Have been trying to compile libpaddle_inference.so on Ubuntu 20 without success. Used cmake .. -DWITH_CONTRIB=OFF -DWITH_MKL=ON -DWITH_MKLDNN=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_INFERENCE_API_TEST=OFF -DON_INFER=ON -DWITH_PYTHON=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda-12.4/bin/nvcc -DWITH_GPU=ON -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.4

Error is Command-line error: invalid or no value specified with --nv_arch flag

1 catastrophic error detected in this compilation. Compilation terminated. CMake Error at warprnnt_generated_rnnt_entrypoint.cu.o.Release.cmake:280 (message): Error generating file /paddleocr/Paddle/build/third_party/warprnnt/src/extern_warprnnt-build/CMakeFiles/warprnnt.dir/src/./warprnnt_generated_rnnt_entrypoint.cu.o

Have tried to compile with Cuda 11.7 and 12.1 both also failed at some cuda compilation. Am using gcc8. cuddn version 8.9

Able to compile withou -DWITH_GPU=ON but gpu is not used during run.

Able to compile and run on Ubuntu 18. But need to upgrade to Ubuntu 20 due to new gpu RTX4060 being not compatible with Ubuntu 18. Will Ubuntu 18 be compatible with RTX30360, if so will acquire RTX3060.

Am using gcc8.

Appreciate any advice on how to compile libpaddle_inference.so with gpu support on Ubunut 20 Or anyone has a libpaddle_inference.so compiled on ubuntu 20?

Thank you

richardgohth avatar Mar 15 '24 23:03 richardgohth