paddle1.6.2GPU预测库编译出错【ubuntu18.04 cuda10 cudnn7.4】
Created by: mitsuix
CPU版本没问题,但是GPU和TensorRT都选择ON时,编译报错。麻烦帮看下,谢谢啦~ [ 33%] Building NVCC (Device) object paddle/fluid/operators/CMakeFiles/activation_op.dir/activation_op_generated_activation_op.cu.o /home/paddle/workspace_Bin/paddlepaddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(919): error: no instance of overloaded function "max" matches the argument list argument types are: (const paddle::platform::float16, const paddle::platform::float16) detected during: instantiation of "T Eigen::numext::maxi(const T &, const T &) [with T=paddle::platform::float16]" /home/paddle/workspace_Bin/paddlepaddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/../../../Eigen/src/Core/functors/BinaryFunctors.h(170): here instantiation of "const Eigen::internal::scalar_max_op<LhsScalar, RhsScalar>::result_type Eigen::internal::scalar_max_op<LhsScalar, RhsScalar>::operator()(const LhsScalar &, const RhsScalar &) const [with LhsScalar=paddle::platform::float16, RhsScalar=paddle::platform::float16]" /home/paddle/workspace_Bin/paddlepaddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h(642): here instantiation of "Eigen::TensorEvaluator<const Eigen::TensorCwiseBinaryOp<BinaryOp, LeftArgType, RightArgType>, Device>::CoeffReturnType Eigen::TensorEvaluator<const Eigen::TensorCwiseBinaryOp<BinaryOp, LeftArgType, RightArgType>, Device>::coeff(Eigen::TensorEvaluator<const Eigen::TensorCwiseBinaryOp<BinaryOp, LeftArgType, RightArgType>, Device>::Index) const [with BinaryOp=Eigen::internal::scalar_max_op<paddle::platform::float16, paddle::platform::float16>, LeftArgType=const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>, RightArgType=const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_oppaddle::platform::float16, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>>, Device=Eigen::GpuDevice]" /home/paddle/workspace_Bin/paddlepaddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h(505): here instantiation of "Eigen::TensorEvaluator<const Eigen::TensorCwiseUnaryOp<UnaryOp, ArgType>, Device>::CoeffReturnType Eigen::TensorEvaluator<const Eigen::TensorCwiseUnaryOp<UnaryOp, ArgType>, Device>::coeff(Eigen::TensorEvaluator<const Eigen::TensorCwiseUnaryOp<UnaryOp, ArgType>, Device>::Index) const [with UnaryOp=Eigen::internal::scalar_opposite_oppaddle::platform::float16, ArgType=const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<paddle::platform::float16, paddle::platform::float16>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_oppaddle::platform::float16, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>>>, Device=Eigen::GpuDevice]" /home/paddle/workspace_Bin/paddlepaddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h(642): here instantiation of "Eigen::TensorEvaluator<const Eigen::TensorCwiseBinaryOp<BinaryOp, LeftArgType, RightArgType>, Device>::CoeffReturnType Eigen::TensorEvaluator<const Eigen::TensorCwiseBinaryOp<BinaryOp, LeftArgType, RightArgType>, Device>::coeff(Eigen::TensorEvaluator<const Eigen::TensorCwiseBinaryOp<BinaryOp, LeftArgType, RightArgType>, Device>::Index) const [with BinaryOp=Eigen::internal::scalar_difference_op<paddle::platform::float16, paddle::platform::float16>, LeftArgType=const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_oppaddle::platform::float16, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<paddle::platform::float16, paddle::platform::float16>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_oppaddle::platform::float16, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>>>>, RightArgType=const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_log_oppaddle::platform::float16, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_sum_op<paddle::platform::float16, paddle::platform::float16>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_exp_oppaddle::platform::float16, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_oppaddle::platform::float16, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<paddle::platform::float16, paddle::platform::float16>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_oppaddle::platform::float16, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>>>>>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_exp_oppaddle::platform::float16, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_difference_op<paddle::platform::float16, paddle::platform::float16>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<paddle::platform::float16, paddle::platform::float16>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_oppaddle::platform::float16, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>>>>>>>, Device=Eigen::GpuDevice]" /home/paddle/workspace_Bin/paddlepaddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h(180): here [ 10 instantiation contexts not shown ] instantiation of class "paddle::operators::ActivationKernel<DeviceContext, Functor> [with DeviceContext=paddle::platform::CUDADeviceContext, Functor=paddle::operators::LogSigmoidFunctorpaddle::platform::float16]" /home/paddle/workspace_Bin/paddlepaddle/paddle/fluid/framework/op_registry.h(109): here instantiation of "void paddle::framework::OpKernelRegistrarFunctor<PlaceType, false, I, KernelTypes...>::operator()(const char *, const char *, int) const [with PlaceType=paddle::platform::CUDAPlace, I=2UL, KernelTypes=<paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::LogSigmoidFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::LogSigmoidFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::LogSigmoidFunctorpaddle::platform::float16>>]" /home/paddle/workspace_Bin/paddlepaddle/paddle/fluid/framework/op_registry.h(114): here instantiation of "void paddle::framework::OpKernelRegistrarFunctor<PlaceType, false, I, KernelTypes...>::operator()(const char *, const char *, int) const [with PlaceType=paddle::platform::CUDAPlace, I=1UL, KernelTypes=<paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::LogSigmoidFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::LogSigmoidFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::LogSigmoidFunctorpaddle::platform::float16>>]" /home/paddle/workspace_Bin/paddlepaddle/paddle/fluid/framework/op_registry.h(114): here instantiation of "void paddle::framework::OpKernelRegistrarFunctor<PlaceType, false, I, KernelTypes...>::operator()(const char *, const char *, int) const [with PlaceType=paddle::platform::CUDAPlace, I=0UL, KernelTypes=<paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::LogSigmoidFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::LogSigmoidFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::LogSigmoidFunctorpaddle::platform::float16>>]" /home/paddle/workspace_Bin/paddlepaddle/paddle/fluid/framework/op_registry.h(132): here instantiation of "paddle::framework::OpKernelRegistrar<PlaceType, KernelType...>::OpKernelRegistrar(const char *, const char *, int) [with PlaceType=paddle::platform::CUDAPlace, KernelType=<paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::LogSigmoidFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::LogSigmoidFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::LogSigmoidFunctorpaddle::platform::float16>>]" /home/paddle/workspace_Bin/paddlepaddle/paddle/fluid/operators/activation_op.cu(34): here
/home/paddle/workspace_Bin/paddlepaddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(911): error: no instance of overloaded function "min" matches the argument list argument types are: (const paddle::platform::float16, const paddle::platform::float16) detected during: instantiation of "T Eigen::numext::mini(const T &, const T &) [with T=paddle::platform::float16]" /home/paddle/workspace_Bin/paddlepaddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/../../../Eigen/src/Core/functors/BinaryFunctors.h(144): here instantiation of "const Eigen::internal::scalar_min_op<LhsScalar, RhsScalar>::result_type Eigen::internal::scalar_min_op<LhsScalar, RhsScalar>::operator()(const LhsScalar &, const RhsScalar &) const [with LhsScalar=paddle::platform::float16, RhsScalar=paddle::platform::float16]" /home/paddle/workspace_Bin/paddlepaddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h(642): here instantiation of "Eigen::TensorEvaluator<const Eigen::TensorCwiseBinaryOp<BinaryOp, LeftArgType, RightArgType>, Device>::CoeffReturnType Eigen::TensorEvaluator<const Eigen::TensorCwiseBinaryOp<BinaryOp, LeftArgType, RightArgType>, Device>::coeff(Eigen::TensorEvaluator<const Eigen::TensorCwiseBinaryOp<BinaryOp, LeftArgType, RightArgType>, Device>::Index) const [with BinaryOp=Eigen::internal::scalar_min_op<paddle::platform::float16, paddle::platform::float16>, LeftArgType=const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<const paddle::platform::float16, const paddle::platform::float16>, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>>, RightArgType=const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_oppaddle::platform::float16, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<const paddle::platform::float16, const paddle::platform::float16>, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>>>, Device=Eigen::GpuDevice]" /home/paddle/workspace_Bin/paddlepaddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h(180): here instantiation of "void Eigen::TensorEvaluator<const Eigen::TensorAssignOp<LeftArgType, RightArgType>, Device>::evalScalar(Eigen::TensorEvaluator<const Eigen::TensorAssignOp<LeftArgType, RightArgType>, Device>::Index) [with LeftArgType=Eigen::TensorMap<Eigen::Tensor<paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, RightArgType=const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_min_op<paddle::platform::float16, paddle::platform::float16>, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<const paddle::platform::float16, const paddle::platform::float16>, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>>, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_oppaddle::platform::float16, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<const paddle::platform::float16, const paddle::platform::float16>, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>>>>, Device=Eigen::GpuDevice]" /home/paddle/workspace_Bin/paddlepaddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h(588): here instantiation of "void Eigen::internal::EigenMetaKernelEval<Evaluator, StorageIndex, Vectorizable>::run(Evaluator &, StorageIndex, StorageIndex, StorageIndex) [with Evaluator=Eigen::TensorEvaluator<const Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_min_op<paddle::platform::float16, paddle::platform::float16>, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<const paddle::platform::float16, const paddle::platform::float16>, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>>, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_oppaddle::platform::float16, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<const paddle::platform::float16, const paddle::platform::float16>, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_op, const Eigen::TensorMap<Eigen::Tensor<const paddle::platform::float16, 1, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>>>>>, Eigen::GpuDevice>, StorageIndex=long, Vectorizable=false]" /home/paddle/workspace_Bin/paddlepaddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h(621): here [ 8 instantiation contexts not shown ] instantiation of class "paddle::operators::ActivationKernel<DeviceContext, Functor> [with DeviceContext=paddle::platform::CUDADeviceContext, Functor=paddle::operators::BReluFunctorpaddle::platform::float16]" /home/paddle/workspace_Bin/paddlepaddle/paddle/fluid/framework/op_registry.h(109): here instantiation of "void paddle::framework::OpKernelRegistrarFunctor<PlaceType, false, I, KernelTypes...>::operator()(const char *, const char *, int) const [with PlaceType=paddle::platform::CUDAPlace, I=2UL, KernelTypes=<paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::BReluFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::BReluFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::BReluFunctorpaddle::platform::float16>>]" /home/paddle/workspace_Bin/paddlepaddle/paddle/fluid/framework/op_registry.h(114): here instantiation of "void paddle::framework::OpKernelRegistrarFunctor<PlaceType, false, I, KernelTypes...>::operator()(const char *, const char *, int) const [with PlaceType=paddle::platform::CUDAPlace, I=1UL, KernelTypes=<paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::BReluFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::BReluFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::BReluFunctorpaddle::platform::float16>>]" /home/paddle/workspace_Bin/paddlepaddle/paddle/fluid/framework/op_registry.h(114): here instantiation of "void paddle::framework::OpKernelRegistrarFunctor<PlaceType, false, I, KernelTypes...>::operator()(const char *, const char *, int) const [with PlaceType=paddle::platform::CUDAPlace, I=0UL, KernelTypes=<paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::BReluFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::BReluFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::BReluFunctorpaddle::platform::float16>>]" /home/paddle/workspace_Bin/paddlepaddle/paddle/fluid/framework/op_registry.h(132): here instantiation of "paddle::framework::OpKernelRegistrar<PlaceType, KernelType...>::OpKernelRegistrar(const char *, const char *, int) [with PlaceType=paddle::platform::CUDAPlace, KernelType=<paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::BReluFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::BReluFunctor>, paddle::operators::ActivationKernel<paddle::platform::CUDADeviceContext, paddle::operators::BReluFunctorpaddle::platform::float16>>]" /home/paddle/workspace_Bin/paddlepaddle/paddle/fluid/operators/activation_op.cu(34): here
2 errors detected in the compilation of "/tmp/tmpxft_000051f9_00000000-13_activation_op.compute_75.cpp1.ii". CMake Error at activation_op_generated_activation_op.cu.o.Release.cmake:275 (message): Error generating file /home/paddle/workspace_Bin/paddlepaddle/build/paddle/fluid/operators/CMakeFiles/activation_op.dir//./activation_op_generated_activation_op.cu.o
paddle/fluid/operators/CMakeFiles/activation_op.dir/build.make:1716: recipe for target 'paddle/fluid/operators/CMakeFiles/activation_op.dir/activation_op_generated_activation_op.cu.o' failed make[3]: *** [paddle/fluid/operators/CMakeFiles/activation_op.dir/activation_op_generated_activation_op.cu.o] Error 1 CMakeFiles/Makefile2:31081: recipe for target 'paddle/fluid/operators/CMakeFiles/activation_op.dir/all' failed make[2]: *** [paddle/fluid/operators/CMakeFiles/activation_op.dir/all] Error 2 CMakeFiles/Makefile2:527: recipe for target 'CMakeFiles/inference_lib_dist.dir/rule' failed make[1]: *** [CMakeFiles/inference_lib_dist.dir/rule] Error 2 Makefile:320: recipe for target 'inference_lib_dist' failed make: *** [inference_lib_dist] Error 2