【编译错误】官方docker镜像编译paddle带tensorRT失败
Created by: 1224wxwx
-
版本、环境信息: 1)PaddlePaddle版本:v1.6.3 2)CPU: 3)GPU:K80, CUDA9.0 CUDNN7.6.5 4)系统环境:nvidia-docker2 安装的官方docker镜像paddle:1.6.3-gpu-cuda9.0-cudnn7,gcc改为4.8,ubuntu16.04,tensorRT5.1
-
安装方式信息: 3)docker编译:请提供docker镜像,编译命令 官方docker镜像paddle:1.6.3-gpu-cuda9.0-cudnn7
-
复现信息:如为报错,请给出复现环境、复现步骤
-
问题描述:请详细描述您的问题,同步贴出报错信息、日志/代码关键片段
- 进入docker交互后,安装gcc4.8与g++4.8并建立软链接
- 根据https://docs.nvidia.com/deeplearning/sdk/tensorrt-install-guide/index.html#installing-debian 里的步骤通过debian安装tensorRT5.1
- 根据 https://www.paddlepaddle.org.cn/documentation/docs/zh/1.6/beginners_guide/install/compile/compile_Ubuntu.html 的步骤,一直执行到 cmake .. -DPY_VERSION=3.5 -DWITH_GPU=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Releas 都是正确的,在make以后报错如下:
/paddle/Paddle/paddle/fluid/framework/tensor_util.cu(1): error: this declaration has no storage class or type specifier
/paddle/Paddle/paddle/fluid/framework/tensor_util.cu(1): error: expected a ";"
2 errors detected in the compilation of "/tmp/tmpxft_000035ac_00000000-12_tensor_util.compute_70.cpp1.ii". CMake Error at tensor_generated_tensor_util.cu.o.cmake:262 (message): Error generating file /paddle/Paddle/build/paddle/fluid/framework/CMakeFiles/tensor.dir//./tensor_generated_tensor_util.cu.o
另外我看到之前一个issue的comment https://github.com/PaddlePaddle/Paddle/issues/8931#issuecomment-372195937 里也提到了类似的错误,但是和这里不同的是,我使用的是nvidia-docker并且确定在使用原本docker里的版本预测时候,GPU是起效的。
Thank you for contributing to PaddlePaddle. Before submitting the issue, you could search issue in Github in case that there was a similar issue submitted or resolved before. If there is no solution,please make sure that this is an installation issue including the following details: System information -PaddlePaddle version (eg.1.1)or CommitID -CPU: including CPUMKL/OpenBlas/MKLDNN version -GPU: including CUDA/CUDNN version -OS Platform (eg. Mac OS 10.14) -Python version
- Install method: pip install/install with docker/build from source(without docker)/build within docker
- Other special cases that you think may be related to this problem, eg. offline install, special internet condition To Reproduce Steps to reproduce the behavior Describe your current behavior Code to reproduce the issue Other info / logs