caffe2
caffe2 copied to clipboard
error: mismatched argument pack lengths while expanding ‘std::is_constructible
System information
- Operating system: Ubuntu 17.10
- Compiler version: gcc 6.4.0 20171010 (Ubuntu 6.4.0-8ubuntu1)
- CMake version: 3.9.1
- CMake arguments: -DUSE_CUDA=ON -DUSE_GLOO=OFF
- Relevant libraries/versions (e.g. CUDA): CUDA 9.1 CUdnn 7.0.1
CMake summary output
******** Summary ********
[ 51%] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/operators/caffe2_gpu_generated_boolean_unmask_ops.cu.o
/home/admin/Downloads/caffe2/caffe2/core/context_gpu.h: In destructor ‘caffe2::CUDAContext::~CUDAContext()’:
/home/admin/Downloads/caffe2/caffe2/core/context_gpu.h:148:66: warning: throw will always call terminate() [-Wterminate]
^
/home/admin/Downloads/caffe2/caffe2/core/context_gpu.h:148:66: note: in C++11 destructors default to noexcept
/home/admin/Downloads/caffe2/caffe2/core/context_gpu.h: In destructor ‘caffe2::CUDAContext::~CUDAContext()’:
/home/admin/Downloads/caffe2/caffe2/core/context_gpu.h:148:66: warning: throw will always call terminate() [-Wterminate]
^
/home/admin/Downloads/caffe2/caffe2/core/context_gpu.h:148:66: note: in C++11 destructors default to noexcept
/home/admin/Downloads/caffe2/caffe2/core/context_gpu.h: In destructor ‘caffe2::CUDAContext::~CUDAContext()’:
/home/admin/Downloads/caffe2/caffe2/core/context_gpu.h:148:66: warning: throw will always call terminate() [-Wterminate]
^
/home/admin/Downloads/caffe2/caffe2/core/context_gpu.h:148:66: note: in C++11 destructors default to noexcept
[ 52%] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/operators/caffe2_gpu_generated_cast_op.cu.o
[ 52%] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/operators/caffe2_gpu_generated_channel_shuffle_op_gpu.cu.o
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<<anonymous>, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<long unsigned int&, long unsigned int&, long unsigned int&>}; bool <anonymous> = true; _Elements = {long unsigned int&, long unsigned int&, long unsigned int&}]’:
/usr/include/c++/6/tuple:626:248: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), long unsigned int&, long unsigned int&, long unsigned int&>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), long unsigned int&, long unsigned int&, long unsigned int&>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), long unsigned int&, long unsigned int&, long unsigned int&>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {std::tuple<long unsigned int&, long unsigned int&, long unsigned int&>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), long unsigned int&, long unsigned int&, long unsigned int&>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), long unsigned int&, long unsigned int&, long unsigned int&>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), long unsigned int&, long unsigned int&, long unsigned int&>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> = <missing>]’
/usr/include/c++/6/tuple:1545:43: required from ‘constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {long unsigned int, long unsigned int, long unsigned int}]’
/home/admin/Downloads/caffe2/caffe2/operators/elementwise_op.h:241:10: required from ‘bool caffe2::BinaryElementwiseOp<InputTypes, Context, Functor, TypeMap>::DoRunWithType() [with T = float; InputTypes = caffe2::TensorTypes<float>; Context = caffe2::CUDAContext; Functor = caffe2::WithoutBroadcast<caffe2::AbsGradientCUDAFunctor>; TypeMap = caffe2::SameTypeAsInput]’
/home/admin/Downloads/caffe2/caffe2/core/operator.h:638:80: required from ‘static bool caffe2::DispatchHelper<caffe2::TensorTypes<FirstType, Types ...>, ExtraArgs ...>::call(Op*, const caffe2::TypeMeta&) [with Op = caffe2::BinaryElementwiseOp<caffe2::TensorTypes<float>, caffe2::CUDAContext, caffe2::WithoutBroadcast<caffe2::AbsGradientCUDAFunctor> >; FirstType = float; Types = {}; ExtraArgs = {}]’
/home/admin/Downloads/caffe2/caffe2/core/operator.h:640:47: required from ‘static bool caffe2::DispatchHelper<caffe2::TensorTypes<FirstType, Types ...>, ExtraArgs ...>::call(Op*, const caffe2::Tensor<Context>&) [with Op = caffe2::BinaryElementwiseOp<caffe2::TensorTypes<float>, caffe2::CUDAContext, caffe2::WithoutBroadcast<caffe2::AbsGradientCUDAFunctor> >; Context = caffe2::CUDAContext; FirstType = float; Types = {}; ExtraArgs = {}]’
/home/admin/Downloads/caffe2/caffe2/operators/elementwise_op.h:215:42: required from ‘bool caffe2::BinaryElementwiseOp<InputTypes, Context, Functor, TypeMap>::RunOnDevice() [with InputTypes = caffe2::TensorTypes<float>; Context = caffe2::CUDAContext; Functor = caffe2::WithoutBroadcast<caffe2::AbsGradientCUDAFunctor>; TypeMap = caffe2::SameTypeAsInput]’
/tmp/tmpxft_00007b15_00000000-5_abs_op.compute_70.cudafe1.stub.c:20:27: required from here
/usr/include/c++/6/tuple:483:67: error: mismatched argument pack lengths while expanding ‘std::is_constructible<_Elements, _UElements&&>’
return __and_<is_constructible<_Elements, _UElements&&>...>::value;
^~~~~
/usr/include/c++/6/tuple:484:1: error: body of constexpr function ‘static constexpr bool std::_TC<<anonymous>, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<long unsigned int&, long unsigned int&, long unsigned int&>}; bool <anonymous> = true; _Elements = {long unsigned int&, long unsigned int&, long unsigned int&}]’ not a return-statement
}
^
We don't test this configuration yet, but should be fixed.
@slayton58 Have you seen this before?
I just downloaded CUDA 9.1.85 and built, with the only issues being some symbols in NCCL (I'm building against a locally-built version with CUDA 9) -- I don't see the errors above.
@feldim2425 Was this a clean compile from a new / nuked build directory?
It was a new build directory
Do you have an earlier compiler available to test with? I just noticed you're on 6.4, I'm on 5.4
Yes but there is this issue (#1633) , that gcc-5 also fails. Also without cuda
@feldim2425 Let me try and build a 17.10 container to see if I can repro the issue.
After building again I noticed that I didn't paste the full error message. I hope this gist contains more information: https://gist.github.com/feldim2425/7d54761518f887d2b0faa4331c899905
Found a post on the NVIDIA Forum: https://devtalk.nvidia.com/default/topic/1028112/cuda-setup-and-installation/nvcc-bug-related-to-gcc-6-lt-tuple-gt-header-/ Seems to be a issue with nvcc.
It seems that CUDA 9.1 is yet supported. I encountered this error when building from source on Ubuntu 16.04, CUDA 9.1, cuDNN 7.0.1
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find CUDA: Found unsuitable version "9.1", but required is exact
version "8.0" (found /usr/local/cuda)
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.5/Modules/FindCUDA.cmake:949 (find_package_handle_standard_args)
/usr/local/share/OpenCV/OpenCVConfig.cmake:48 (find_package)
/usr/local/share/OpenCV/OpenCVConfig.cmake:291 (find_host_package)
cmake/Dependencies.cmake:213 (find_package)
CMakeLists.txt:88 (include)
-- Configuring incomplete, errors occurred!
See also "/home/cuongdd/caffe2/build/CMakeFiles/CMakeOutput.log".
See also "/home/cuongdd/caffe2/build/CMakeFiles/CMakeError.log".
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 1
Thank you, my error, OpenCV 2.4, installed 3.4 and that error is eliminated.
This issue is numpy.
Requirement already satisfied: numpy in /usr/lib/python2.7/dist-packages
Requirement already satisfied: scipy in /usr/local/lib/python2.7/dist-packages
-- Found PythonInterp: /usr/local/bin/python (found suitable version "2.7.13", minimum required is "2.7")
Traceback (most recent call last):
File "
This cmake line workd, a successful cmake run, (from pybind)
cmake -DPYTHON_LIBRARY=$(python-config --prefix)/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=$(python-config --prefix)/include/python2.7 .
make fails here.
[ 78%] Linking CXX executable ../bin/elementwise_op_gpu_test
../lib/libcaffe2_gpu.so: undefined reference to `cv::String::allocate(unsigned long)'
../lib/libcaffe2_gpu.so: undefined reference to `cv::error(int, cv::String const&, char const*, char const*, int)'
../lib/libcaffe2_gpu.so: undefined reference to `cv::String::deallocate()'
collect2: error: ld returned 1 exit status
caffe2/CMakeFiles/elementwise_op_gpu_test.dir/build.make:133: recipe for target 'bin/elementwise_op_gpu_test' failed
make[2]: *** [bin/elementwise_op_gpu_test] Error 1
CMakeFiles/Makefile2:1249: recipe for target 'caffe2/CMakeFiles/elementwise_op_gpu_test.dir/all' failed
make[1]: *** [caffe2/CMakeFiles/elementwise_op_gpu_test.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
@apiszcz your latest error is #1614
Tried it again with CUDA 9.2 and it seems to work.
CUDA 9.2 cuDNN 7.1.4 nvcc release 9.2, V9.2.88 gcc & g++ 6.4.0 Ubuntu 18.04 LTS