首页 Paddle框架 帖子详情
【编译错误】官方docker镜像编译paddle带tensorRT失败
收藏
快速回复
Paddle框架 问答深度学习 1328 3
【编译错误】官方docker镜像编译paddle带tensorRT失败
收藏
快速回复
Paddle框架 问答深度学习 1328 3
  • 版本、环境信息:
       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

  • 复现信息:如为报错,请给出复现环境、复现步骤

  • 问题描述:请详细描述您的问题,同步贴出报错信息、日志/代码关键片段

    1. 进入docker交互后,安装gcc4.8与g++4.8并建立软链接
    2. 根据https://docs.nvidia.com/deeplearning/sdk/tensorrt-install-guide/index.html#installing-debian 里的步骤通过debian安装tensorRT5.1
    3. 根据 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 #8931 (comment) 里也提到了类似的错误,但是和这里不同的是,我使用的是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
0
收藏
回复
全部评论(3)
时间顺序
AIStudio784542
#2 回复于2020-02

请尝试再使用该docker镜像原有gcc编译

0
回复
AIStudio792101
#3 回复于2020-02
@jiweibo

谢谢回复!

我调整回使用该docker镜像原有gcc5.4 编译,依然报错如下,似乎是一样的:

/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_00002ff1_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 paddle/fluid/framework/CMakeFiles/tensor.dir/build.make:63: recipe for target 'paddle/fluid/framework/CMakeFiles/tensor.dir/tensor_generated_tensor_util.cu.o' failed

0
回复
AIStudio792101
#4 回复于2020-02

最后发现是 #8931 (comment) 这里提到的问题,这个文件居然不是软链接,但是我并没有改动过代码,非常奇怪,后面还有一个文件也是这样的问题,在删除并手动建立软链接后成功编译。

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户