Skip to content

Compilation error: math_function_generated_im2col.cu.o #8715

Closed
@luotao1

Description

@luotao1
/home/luotao02/Paddle/paddle/fluid/framework/dim.h(161): error: Within a __device__/__global__ function, only __shared__ variables may be marked "static"

/home/luotao02/Paddle/paddle/fluid/framework/dim.h(187): error: Within a __device__/__global__ function, only __shared__ variables may be marked "static"

2 errors detected in the compilation of "/home/luotao02/.tmp/tmpxft_00003712_00000000-7_im2col.cpp1.ii".
CMake Error at math_function_generated_im2col.cu.o.cmake:260 (message):
  Error generating file
  /home/luotao02/Paddle/build/paddle/fluid/operators/math/CMakeFiles/math_function.dir//./math_function_generated_im2col.cu.o


make[2]: *** [paddle/fluid/operators/math/CMakeFiles/math_function.dir/math_function_generated_im2col.cu.o] Error 1
make[1]: *** [paddle/fluid/operators/math/CMakeFiles/math_function.dir/all] Error 2
make: *** [all] Error 2

This error is similar to tensorflow/tensorflow#10258.
The reason is that On CUDA versions previous to 8.0, only shared variables could be declared as static in the device code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions