paddle 源码编译出错
Created by: thomaslwang
[ 80%] Building CXX object paddle/operators/CMakeFiles/conv2d_op.dir/conv2d_op.cc.o
In file included from /home/tom/workspace/paddle/paddle/framework/grad_op_builder.h:17:0,
from /home/tom/workspace/paddle/paddle/framework/op_registry.h:25,
from /home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:18,
from /home/tom/workspace/paddle/paddle/operators/conv2d_op.cc:15:
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h: In instantiation of ‘void paddle::operators::GemmConvGrad2DKernel<Place, T>::Compute(const paddle::framework::ExecutionContext&) const [with Place = paddle::platform::CPUPlace; T = float]’:
/home/tom/workspace/paddle/paddle/operators/conv2d_op.cc:133:79: required from here
/home/tom/workspace/paddle/paddle/framework/operator.h:340:34: error: ‘const paddle::platform::DeviceContext& paddle::framework::ExecutionContext::device_context_’ is private
const platform::DeviceContext& device_context_;
^
In file included from /home/tom/workspace/paddle/paddle/operators/conv2d_op.cc:15:0:
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:164:69: error: within this context
const_cast<platform::DeviceContext*>(context.device_context_);
^
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:164:69: error: invalid const_cast from type ‘const paddle::platform::DeviceContext’ to type ‘paddle::platform::DeviceContext*’
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:188:77: error: no matching function for call to ‘matmul(paddle::operators::Tensor&, bool, paddle::operators::Tensor&, bool, float, paddle::operators::Tensor*, float, paddle::platform::DeviceContext*&)’
T(1.0), &col_matrix, T(0.0), device_context);
^
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:188:77: note: candidate is:
In file included from /home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:20:0,
from /home/tom/workspace/paddle/paddle/operators/conv2d_op.cc:15:
/home/tom/workspace/paddle/paddle/operators/math/math_function.h:75:6: note: template<class Place, class T> void paddle::operators::math::matmul(const paddle::platform::DeviceContext&, const paddle::framework::Tensor&, bool, const paddle::framework::Tensor&, bool, T, paddle::framework::Tensor*, T)
void matmul(const platform::DeviceContext& context,
^
/home/tom/workspace/paddle/paddle/operators/math/math_function.h:75:6: note: template argument deduction/substitution failed:
In file included from /home/tom/workspace/paddle/paddle/operators/conv2d_op.cc:15:0:
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:188:77: note: cannot convert ‘filter_slice’ (type ‘paddle::operators::Tensor {aka paddle::framework::Tensor}’) to type ‘const paddle::platform::DeviceContext&’
T(1.0), &col_matrix, T(0.0), device_context);
^
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:223:48: error: no matching function for call to ‘matmul(paddle::operators::Tensor&, bool, paddle::operators::Tensor&, bool, float, paddle::operators::Tensor*, float, paddle::platform::DeviceContext*&)’
device_context);
^
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:223:48: note: candidate is:
In file included from /home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:20:0,
from /home/tom/workspace/paddle/paddle/operators/conv2d_op.cc:15:
/home/tom/workspace/paddle/paddle/operators/math/math_function.h:75:6: note: template<class Place, class T> void paddle::operators::math::matmul(const paddle::platform::DeviceContext&, const paddle::framework::Tensor&, bool, const paddle::framework::Tensor&, bool, T, paddle::framework::Tensor*, T)
void matmul(const platform::DeviceContext& context,
^
/home/tom/workspace/paddle/paddle/operators/math/math_function.h:75:6: note: template argument deduction/substitution failed:
In file included from /home/tom/workspace/paddle/paddle/operators/conv2d_op.cc:15:0:
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:223:48: note: cannot convert ‘out_grad_slice’ (type ‘paddle::operators::Tensor {aka paddle::framework::Tensor}’) to type ‘const paddle::platform::DeviceContext&’
device_context);
^
In file included from /home/tom/workspace/paddle/paddle/framework/grad_op_builder.h:17:0,
from /home/tom/workspace/paddle/paddle/framework/op_registry.h:25,
from /home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:18,
from /home/tom/workspace/paddle/paddle/operators/conv2d_op.cc:15:
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h: In instantiation of ‘void paddle::operators::GemmConv2DKernel<Place, T>::Compute(const paddle::framework::ExecutionContext&) const [with Place = paddle::platform::CPUPlace; T = float]’:
/home/tom/workspace/paddle/paddle/operators/conv2d_op.cc:133:79: required from here
/home/tom/workspace/paddle/paddle/framework/operator.h:340:34: error: ‘const paddle::platform::DeviceContext& paddle::framework::ExecutionContext::device_context_’ is private
const platform::DeviceContext& device_context_;
^
In file included from /home/tom/workspace/paddle/paddle/operators/conv2d_op.cc:15:0:
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:79:69: error: within this context
const_cast<platform::DeviceContext*>(context.device_context_);
^
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:79:69: error: invalid const_cast from type ‘const paddle::platform::DeviceContext’ to type ‘paddle::platform::DeviceContext*’
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:97:66: error: no matching function for call to ‘matmul(paddle::operators::Tensor&, bool, paddle::operators::Tensor&, bool, float, paddle::operators::Tensor*, float, paddle::platform::DeviceContext*&)’
&out_slice, T(0.0), device_context);
^
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:97:66: note: candidate is:
In file included from /home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:20:0,
from /home/tom/workspace/paddle/paddle/operators/conv2d_op.cc:15:
/home/tom/workspace/paddle/paddle/operators/math/math_function.h:75:6: note: template<class Place, class T> void paddle::operators::math::matmul(const paddle::platform::DeviceContext&, const paddle::framework::Tensor&, bool, const paddle::framework::Tensor&, bool, T, paddle::framework::Tensor*, T)
void matmul(const platform::DeviceContext& context,
^
/home/tom/workspace/paddle/paddle/operators/math/math_function.h:75:6: note: template argument deduction/substitution failed:
In file included from /home/tom/workspace/paddle/paddle/operators/conv2d_op.cc:15:0:
/home/tom/workspace/paddle/paddle/operators/gemm_conv2d_op.h:97:66: note: cannot convert ‘filter_slice’ (type ‘paddle::operators::Tensor {aka paddle::framework::Tensor}’) to type ‘const paddle::platform::DeviceContext&’
&out_slice, T(0.0), device_context);
^
make[2]: *** [paddle/operators/CMakeFiles/conv2d_op.dir/conv2d_op.cc.o] Error 1
make[1]: *** [paddle/operators/CMakeFiles/conv2d_op.dir/all] Error 2
make: *** [all] Error 2