Tons of compile warning with Nvidia cuda9
Created by: Yancey1989
Related PR #5956 Tons of compile warning like:
/paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h(587): warning: calling a __host__ function from a __host__ __device__ function is not allowed
detected during:
instantiation of "__nv_bool Eigen::TensorEvaluator<const Eigen::TensorReductionOp<Op, Dims, ArgType, MakePointer_>, Device>::evalSubExprsIfNeeded(MakePointer_<Eigen::TensorEvaluator<const Eigen::TensorReductionOp<Op, Dims, ArgType, MakePointer_>, Device>::CoeffReturnType>::Type) [with Op=Eigen::internal::SumReducer<float>, Dims=const Eigen::array<int, 1UL>, ArgType=const Eigen::TensorMap<Eigen::Tensor<const float, 2, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, MakePointer_=Eigen::MakePointer, Device=Eigen::GpuDevice]"
/paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h(129): here
instantiation of "__nv_bool Eigen::TensorEvaluator<const Eigen::TensorReshapingOp<NewDimensions, ArgType>, Device>::evalSubExprsIfNeeded(Eigen::TensorEvaluator<const Eigen::TensorReshapingOp<NewDimensions, ArgType>, Device>::CoeffReturnType *) [with NewDimensions=const Eigen::array<int, 2UL>, ArgType=const Eigen::TensorReductionOp<Eigen::internal::SumReducer<float>, const Eigen::array<int, 1UL>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, Eigen::MakePointer>, Device=Eigen::GpuDevice]"
/paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h(129): here
instantiation of "__nv_bool Eigen::TensorEvaluator<const Eigen::TensorAssignOp<LeftArgType, RightArgType>, Device>::evalSubExprsIfNeeded(Eigen::TensorEvaluator<const Eigen::TensorAssignOp<LeftArgType, RightArgType>, Device>::Scalar *) [with LeftArgType=Eigen::TensorReshapingOp<const Eigen::array<int, 2UL>, Eigen::TensorMap<Eigen::Tensor<float, 2, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>, RightArgType=const Eigen::TensorReshapingOp<const Eigen::array<int, 2UL>, const Eigen::TensorReductionOp<Eigen::internal::SumReducer<float>, const Eigen::array<int, 1UL>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, Eigen::MakePointer>>, Device=Eigen::GpuDevice]"
/paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h(251): here
instantiation of "void Eigen::internal::TensorExecutor<Expression, Eigen::GpuDevice, Vectorizable>::run(const Expression &, const Eigen::GpuDevice &) [with Expression=const Eigen::TensorAssignOp<Eigen::TensorReshapingOp<const Eigen::array<int, 2UL>, Eigen::TensorMap<Eigen::Tensor<float, 2, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>, const Eigen::TensorReshapingOp<const Eigen::array<int, 2UL>, const Eigen::TensorReductionOp<Eigen::internal::SumReducer<float>, const Eigen::array<int, 1UL>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, Eigen::MakePointer>>>, Vectorizable=false]"
/paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h(35): here
instantiation of "Eigen::TensorDevice<ExpressionType, DeviceType> &Eigen::TensorDevice<ExpressionType, DeviceType>::operator=(const OtherDerived &) [with ExpressionType=Eigen::TensorReshapingOp<const Eigen::array<int, 2UL>, Eigen::TensorMap<Eigen::Tensor<float, 2, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>>, DeviceType=Eigen::GpuDevice, OtherDerived=Eigen::TensorReshapingOp<const Eigen::array<int, 2UL>, const Eigen::TensorReductionOp<Eigen::internal::SumReducer<float>, const Eigen::array<int, 1UL>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 1, Eigen::DenseIndex>, 0, Eigen::MakePointer>, Eigen::MakePointer>>]"
/paddle/paddle/operators/math/math_function_impl.h(78): here
instantiation of "void paddle::operators::math::ColwiseSum<Place, T>::operator()(const paddle::platform::DeviceContext &, const paddle::framework::Tensor &, paddle::framework::Tensor *) [with Place=paddle::platform::GPUPlace, T=float]"
/paddle/paddle/operators/math/math_function.cu(299): here
And also use --expt-relaxed-constexpr
as nvcc parameters.
> make VERBOSE=1
/usr/local/cuda/bin/nvcc /paddle/paddle/operators/math/math_function.cu -c -o /paddle/build/paddle/operators/math/CMakeFiles/math_function.dir//./math_function_generated_math_function.cu.o -ccbin /usr/bin/cc -m64 -DPADDLE_USE_MKLML -DLAPACK_FOUND -DPADDLE_USE_MKLDNN -DANY_IMPL_ANY_CAST_MOVEABLE -DPADDLE_USE_DSO -DPADDLE_WITH_TESTING -DPADDLE_DISABLE_TIMER -DPADDLE_DISABLE_PROFILER -DPADDLE_WITH_CUDA -DPADDLE_DISABLE_RDMA -DPADDLE_USE_PTHREAD_SPINLOCK -DPADDLE_USE_PTHREAD_BARRIER -DPADDLE_VERSION=0.10.0 -Xcompiler -mavx --expt-relaxed-constexpr -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Werror -Xcompiler -fPIC -Xcompiler -fno-omit-frame-pointer -Xcompiler -Wno-unused-parameter -Xcompiler -Wno-unused-function -Xcompiler -Wno-error=sign-compare -Xcompiler -Wno-error=literal-suffix -Xcompiler -Wno-error=unused-local-typedefs -Xcompiler -Wno-error=unused-function -Xcompiler -Wno-error=array-bounds -D_MWAITXINTRIN_H_INCLUDED -D__STRICT_ANSI__ -Wno-deprecated-gpu-targets --expt-relaxed-constexpr -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -std=c++11 --use_fast_math -Xcompiler -fPIC --expt-relaxed-constexpr -O3 -DNDEBUG -DNVCC -I/usr/local/cuda/include -I/paddle/build/third_party/install/mklml/mklml_lnx_2018.0.1.20171007/include -I/paddle/build/third_party/install/zlib/include -I/paddle/build/third_party/install/gflags/include -I/paddle/build/third_party/install/glog/include -I/paddle/build/third_party/install/gtest/include -I/paddle/build/third_party/install/protobuf/include -I/usr/include/python2.7 -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/paddle/build/third_party/install/mkldnn/include -I/paddle/build/third_party/install/warpctc/include -I/paddle/build/third_party/any/src/extern_lib_any -I/paddle/build/third_party/eigen3/src/extern_eigen3 -I/paddle/build/third_party/pybind/src/extern_pybind/include -I/paddle/build/third_party/nccl/src/extern_nccl/src -I/paddle/build/third_party/install/cares/include -I/paddle/build/third_party/install/grpc/include -I/usr/include -I/usr/local/cuda/include -I/paddle/build -I/paddle -I/paddle/paddle/cuda/include -I/paddle/build/proto -I/paddle/build/go/pserver/client/c --expt-relaxed-constexpr