chensong1995 / HybridPose

HybridPose: 6D Object Pose Estimation under Hybrid Representation (CVPR 2020)
MIT License
419 stars 64 forks source link

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’: #77

Closed monajalal closed 1 year ago

monajalal commented 1 year ago

I get an error in this step:

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose$ cd lib/ransac_voting_gpu_layer
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$ python setup.py build_ext --inplace
running build_ext
building 'ransac_voting' extension
creating build
creating build/temp.linux-x86_64-cpython-37
creating build/temp.linux-x86_64-cpython-37/src
gcc -pthread -B /home/mona/anaconda3/envs/hybridpose/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/TH -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/THC -I/home/mona/anaconda3/envs/hybridpose/include/python3.7m -c ./src/ransac_voting.cpp -o build/temp.linux-x86_64-cpython-37/./src/ransac_voting.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ransac_voting -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11
cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from ./src/ransac_voting.cpp:1:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:11:4: warning: #warning "Including torch/torch.h for C++ extensions is deprecated. Please include torch/extension.h" [-Wcpp]
   11 | #  warning "Including torch/torch.h for C++ extensions is deprecated. Please include torch/extension.h"
      |    ^~~~~~~
In file included from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/Device.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/Allocator.h:6,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/ATen.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                 from ./src/ransac_voting.cpp:1:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/jit/attributes.h: In function ‘const char* torch::jit::toString(torch::jit::AttributeKind)’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/jit/attributes.h:21:42: warning: expression does not compute the number of elements in this array; element type is ‘const char*’, not ‘torch::jit::AttributeKind’ [-Wsizeof-array-div]
   21 |   AT_ASSERT(size_t(kind) < sizeof(names) / sizeof(AttributeKind));
      |                            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:146:39: note: in definition of macro ‘C10_EXPAND_MSVC_WORKAROUND’
  146 | #define C10_EXPAND_MSVC_WORKAROUND(x) x
      |                                       ^
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:165:34: note: in expansion of macro ‘C10_UNLIKELY’
  165 | #define C10_UNLIKELY_OR_CONST(e) C10_UNLIKELY(e)
      |                                  ^~~~~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:202:7: note: in expansion of macro ‘C10_UNLIKELY_OR_CONST’
  202 |   if (C10_UNLIKELY_OR_CONST(!(cond))) {       \
      |       ^~~~~~~~~~~~~~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:349:32: note: in expansion of macro ‘TORCH_INTERNAL_ASSERT’
  349 |     C10_EXPAND_MSVC_WORKAROUND(TORCH_INTERNAL_ASSERT(__VA_ARGS__)); \
      |                                ^~~~~~~~~~~~~~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/jit/attributes.h:21:3: note: in expansion of macro ‘AT_ASSERT’
   21 |   AT_ASSERT(size_t(kind) < sizeof(names) / sizeof(AttributeKind));
      |   ^~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/jit/attributes.h:21:44: note: add parentheses around ‘sizeof (torch::jit::AttributeKind)’ to silence this warning
   21 |   AT_ASSERT(size_t(kind) < sizeof(names) / sizeof(AttributeKind));
      |                                            ^~~~~~~~~~~~~~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:146:39: note: in definition of macro ‘C10_EXPAND_MSVC_WORKAROUND’
  146 | #define C10_EXPAND_MSVC_WORKAROUND(x) x
      |                                       ^
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:165:34: note: in expansion of macro ‘C10_UNLIKELY’
  165 | #define C10_UNLIKELY_OR_CONST(e) C10_UNLIKELY(e)
      |                                  ^~~~~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:202:7: note: in expansion of macro ‘C10_UNLIKELY_OR_CONST’
  202 |   if (C10_UNLIKELY_OR_CONST(!(cond))) {       \
      |       ^~~~~~~~~~~~~~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/Exception.h:349:32: note: in expansion of macro ‘TORCH_INTERNAL_ASSERT’
  349 |     C10_EXPAND_MSVC_WORKAROUND(TORCH_INTERNAL_ASSERT(__VA_ARGS__)); \
      |                                ^~~~~~~~~~~~~~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/jit/attributes.h:21:3: note: in expansion of macro ‘AT_ASSERT’
   21 |   AT_ASSERT(size_t(kind) < sizeof(names) / sizeof(AttributeKind));
      |   ^~~~~~~~~
In file included from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/jit/ir.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/autograd/generated/variable_factories.h:10,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:7,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                 from ./src/ransac_voting.cpp:1:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/jit/attributes.h:19:22: note: array ‘names’ declared here
   19 |   static const char* names[] = {
      |                      ^~~~~
In file included from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/MemoryFormat.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:2,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                 from ./src/ransac_voting.cpp:1:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/TensorImpl.h:1456:34:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<long int>::Data’ from ‘std::initializer_list<long int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
  103 |       : Data(Vec.begin() == Vec.end() ? static_cast<T*>(nullptr) : Vec.begin()),
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = unsigned char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<unsigned char>::Data’ from ‘std::initializer_list<unsigned char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = signed char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<signed char>::Data’ from ‘std::initializer_list<signed char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = short int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<short int>::Data’ from ‘std::initializer_list<short int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<int>::Data’ from ‘std::initializer_list<int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = float]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<float>::Data’ from ‘std::initializer_list<float>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = double]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<double>::Data’ from ‘std::initializer_list<double>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/usr/bin/nvcc -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/TH -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/THC -I/home/mona/anaconda3/envs/hybridpose/include/python3.7m -c ./src/ransac_voting_kernel.cu -o build/temp.linux-x86_64-cpython-37/./src/ransac_voting_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ransac_voting -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^ 
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/TensorImpl.h:1456:36:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<long int>::Data’ from ‘std::initializer_list<long int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
  102 |   /* implicit */ constexpr ArrayRef(const std::initializer_list<T>& Vec)
      |                                                                  ~~~~~~~                    ^                                         
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = unsigned char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:301:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<unsigned char>::Data’ from ‘std::initializer_list<unsigned char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = signed char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1137:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<signed char>::Data’ from ‘std::initializer_list<signed char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = short int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1964:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<short int>::Data’ from ‘std::initializer_list<short int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:2772:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<int>::Data’ from ‘std::initializer_list<int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = float]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:0:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<float>::Data’ from ‘std::initializer_list<float>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = double]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:0:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<double>::Data’ from ‘std::initializer_list<double>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
error: command '/usr/bin/nvcc' failed with exit code 1
chensong1995 commented 1 year ago

Hi Mona,

Thanks for your interest in our work! I suspect the compiler version causes the problem. Please try using GCC/G++ 10.

Under base, first run:

sudo apt-get install gcc-10 g++-10
export CC=/usr/bin/gcc-10
export CXX=/usr/bin/g++-10
export CUDAHOSTCXX=/usr/bin/g++-10

And then build the project again.

I hope this helps! Let me know if you have any further concerns.

monajalal commented 1 year ago

@chensong1995 thanks a lot for your response.

I followed your instructions and the build keeps failing

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose$ export CC=/usr/bin/gcc-10
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose$ export CXX=/usr/bin/g++-10
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose$ export CUDAHOSTCXX=/usr/bin/g++-10
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose$ cd lib/ransac_voting_gpu_layer
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$ python setup.py build_ext --inplace
running build_ext
building 'ransac_voting' extension
/usr/bin/gcc-10 -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/TH -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/THC -I/home/mona/anaconda3/envs/hybridpose/include/python3.7m -c ./src/ransac_voting.cpp -o build/temp.linux-x86_64-cpython-37/./src/ransac_voting.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ransac_voting -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11
cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from ./src/ransac_voting.cpp:1:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:11:4: warning: #warning "Including torch/torch.h for C++ extensions is deprecated. Please include torch/extension.h" [-Wcpp]
   11 | #  warning "Including torch/torch.h for C++ extensions is deprecated. Please include torch/extension.h"
      |    ^~~~~~~
In file included from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/MemoryFormat.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:2,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                 from ./src/ransac_voting.cpp:1:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/TensorImpl.h:1456:34:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<long int>::Data’ from ‘std::initializer_list<long int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
  103 |       : Data(Vec.begin() == Vec.end() ? static_cast<T*>(nullptr) : Vec.begin()),
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = unsigned char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<unsigned char>::Data’ from ‘std::initializer_list<unsigned char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = signed char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<signed char>::Data’ from ‘std::initializer_list<signed char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = short int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<short int>::Data’ from ‘std::initializer_list<short int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<int>::Data’ from ‘std::initializer_list<int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = float]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<float>::Data’ from ‘std::initializer_list<float>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = double]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<double>::Data’ from ‘std::initializer_list<double>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/usr/bin/nvcc -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/TH -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/THC -I/home/mona/anaconda3/envs/hybridpose/include/python3.7m -c ./src/ransac_voting_kernel.cu -o build/temp.linux-x86_64-cpython-37/./src/ransac_voting_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ransac_voting -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^ 
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/TensorImpl.h:1456:36:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<long int>::Data’ from ‘std::initializer_list<long int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
  102 |   /* implicit */ constexpr ArrayRef(const std::initializer_list<T>& Vec)
      |                                                                  ~~~~~~~                    ^                                         
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = unsigned char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:301:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<unsigned char>::Data’ from ‘std::initializer_list<unsigned char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = signed char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1137:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<signed char>::Data’ from ‘std::initializer_list<signed char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = short int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1964:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<short int>::Data’ from ‘std::initializer_list<short int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:2772:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<int>::Data’ from ‘std::initializer_list<int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = float]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:0:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<float>::Data’ from ‘std::initializer_list<float>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = double]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:0:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<double>::Data’ from ‘std::initializer_list<double>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
error: command '/usr/bin/nvcc' failed with exit code 1
monajalal commented 1 year ago

I ran it slightly different and still get same error. Any suggestion?

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$  export CMAKE_CUDA_HOST_COMPILER=/usr/bin/g++-10
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$ CC=gcc-10 CXX=g++-10 python setup.py build_ext --inplace

and I get the following error:

running build_ext
building 'ransac_voting' extension
gcc-10 -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/TH -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/THC -I/home/mona/anaconda3/envs/hybridpose/include/python3.7m -c ./src/ransac_voting.cpp -o build/temp.linux-x86_64-cpython-37/./src/ransac_voting.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ransac_voting -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11
cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from ./src/ransac_voting.cpp:1:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:11:4: warning: #warning "Including torch/torch.h for C++ extensions is deprecated. Please include torch/extension.h" [-Wcpp]
   11 | #  warning "Including torch/torch.h for C++ extensions is deprecated. Please include torch/extension.h"
      |    ^~~~~~~
In file included from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/MemoryFormat.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:2,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                 from ./src/ransac_voting.cpp:1:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/TensorImpl.h:1456:34:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<long int>::Data’ from ‘std::initializer_list<long int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
  103 |       : Data(Vec.begin() == Vec.end() ? static_cast<T*>(nullptr) : Vec.begin()),
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = unsigned char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<unsigned char>::Data’ from ‘std::initializer_list<unsigned char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = signed char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<signed char>::Data’ from ‘std::initializer_list<signed char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = short int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<short int>::Data’ from ‘std::initializer_list<short int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<int>::Data’ from ‘std::initializer_list<int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = float]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<float>::Data’ from ‘std::initializer_list<float>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = double]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<double>::Data’ from ‘std::initializer_list<double>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/usr/bin/nvcc -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/TH -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/THC -I/home/mona/anaconda3/envs/hybridpose/include/python3.7m -c ./src/ransac_voting_kernel.cu -o build/temp.linux-x86_64-cpython-37/./src/ransac_voting_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ransac_voting -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^ 
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/TensorImpl.h:1456:36:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<long int>::Data’ from ‘std::initializer_list<long int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
  102 |   /* implicit */ constexpr ArrayRef(const std::initializer_list<T>& Vec)
      |                                                                  ~~~~~~~                    ^                                         
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = unsigned char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:301:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<unsigned char>::Data’ from ‘std::initializer_list<unsigned char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = signed char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1137:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<signed char>::Data’ from ‘std::initializer_list<signed char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = short int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1964:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<short int>::Data’ from ‘std::initializer_list<short int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:2772:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<int>::Data’ from ‘std::initializer_list<int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = float]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:0:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<float>::Data’ from ‘std::initializer_list<float>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = double]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:0:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<double>::Data’ from ‘std::initializer_list<double>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
error: command '/usr/bin/nvcc' failed with exit code 1

How should I fix this error? I have the following:

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$ conda list
# packages in environment at /home/mona/anaconda3/envs/hybridpose:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
_pytorch_select           0.2                       gpu_0    anaconda
blas                      1.0                         mkl    anaconda
bzip2                     1.0.8                h7b6447c_0    anaconda
ca-certificates           2023.08.22           h06a4308_0  
cairo                     1.16.0            h3fc0475_1005    conda-forge
certifi                   2020.6.20          pyhd3eb1b0_3  
cffi                      1.15.0           py37h7f8727e_0    anaconda
cudatoolkit               10.0.130                      0  
cudnn                     7.3.1                cuda10.0_0    anaconda
dbus                      1.13.18              hb2f20db_0    anaconda
expat                     2.5.0                h6a678d5_0    anaconda
ffmpeg                    4.1.3                h167e202_0    conda-forge
fontconfig                2.13.1               h6c09931_0    anaconda
freetype                  2.12.1               h4a9f257_0    anaconda
giflib                    5.2.1                h5eee18b_3    anaconda
glib                      2.63.1               h5a9c865_0    anaconda
gmp                       6.2.1                h295c915_3    anaconda
gnutls                    3.6.15               he1e5248_0    anaconda
graphite2                 1.3.14               h295c915_1    anaconda
gst-plugins-base          1.14.5               h0935bb2_2    conda-forge
gstreamer                 1.14.5               h36ae1b5_2    conda-forge
harfbuzz                  2.7.2                hee91db6_0    conda-forge
hdf5                      1.10.5          nompi_h3c11f04_1104    conda-forge
icu                       67.1                 he1b5a44_0    conda-forge
intel-openmp              2022.1.0          h9e868ea_3769    anaconda
jasper                    1.900.1           h07fcdf6_1006    conda-forge
joblib                    1.1.1            py37h06a4308_0    anaconda
jpeg                      9e                   h5eee18b_1    anaconda
krb5                      1.20.1               h568e23c_1    anaconda
lame                      3.100                h7b6447c_0    anaconda
lcms2                     2.12                 h3be6417_0    anaconda
libblas                   3.9.0           1_h6e990d7_netlib    conda-forge
libcblas                  3.9.0           3_h893e4fe_netlib    conda-forge
libclang                  10.0.1          default_hb85057a_2    anaconda
libedit                   3.1.20221030         h5eee18b_0  
libevent                  2.1.10               h9b69904_4    conda-forge
libffi                    3.2.1             hf484d3e_1007  
libgcc-ng                 11.2.0               h1234567_1  
libgfortran-ng            7.5.0               ha8ba4b0_17    anaconda
libgfortran4              7.5.0               ha8ba4b0_17    anaconda
libgomp                   11.2.0               h1234567_1  
libiconv                  1.16                 h7f8727e_2    anaconda
libidn2                   2.3.4                h5eee18b_0    anaconda
liblapack                 3.9.0           3_h893e4fe_netlib    conda-forge
liblapacke                3.9.0           3_h893e4fe_netlib    conda-forge
libllvm10                 10.0.1               hbcb73fb_5    anaconda
libopencv                 3.4.7                    py37_9    conda-forge
libpng                    1.6.39               h5eee18b_0    anaconda
libpq                     12.15                h37d81fd_1    anaconda
libstdcxx-ng              11.2.0               h1234567_1  
libtasn1                  4.19.0               h5eee18b_0    anaconda
libtiff                   4.1.0                hecacb30_2    anaconda
libunistring              0.9.10               h27cfd23_0    anaconda
libuuid                   1.0.3                h7f8727e_2    anaconda
libwebp                   1.0.2                h56121f0_5    conda-forge
libxcb                    1.15                 h7f8727e_0    anaconda
libxkbcommon              0.10.0               he1b5a44_0    conda-forge
libxml2                   2.9.10               h68273f3_2    conda-forge
lz4-c                     1.9.4                h6a678d5_0    anaconda
mkl                       2019.4                      243    anaconda
mkl-service               2.3.0            py37he8ac12f_0    anaconda
mkl_fft                   1.3.0            py37h54f3939_0    anaconda
mkl_random                1.1.0            py37hd6b4f25_0    anaconda
mysql-common              8.0.25               ha770c72_2    conda-forge
mysql-libs                8.0.25               hfa10184_2    conda-forge
ncurses                   6.4                  h6a678d5_0  
nettle                    3.7.3                hbbd107a_1    anaconda
ninja                     1.10.2               h06a4308_5    anaconda
ninja-base                1.10.2               hd09550d_5    anaconda
nspr                      4.35                 h6a678d5_0    anaconda
nss                       3.46.1               hab99668_0    anaconda
numpy                     1.19.2           py37h54aff64_0    anaconda
numpy-base                1.19.2           py37hfa32c7d_0    anaconda
olefile                   0.46                     py37_0    anaconda
opencv                    3.4.7                    py37_9    conda-forge
openh264                  1.8.0                hd408876_0    anaconda
openjpeg                  2.4.0                h3ad879b_0    anaconda
openssl                   1.1.1w               h7f8727e_0  
pcre                      8.45                 h295c915_0    anaconda
pillow                    8.3.1            py37h2c7a002_0    anaconda
pip                       22.3.1           py37h06a4308_0  
pixman                    0.38.0               h7b6447c_0    anaconda
py-opencv                 3.4.7            py37h5ca1d4c_9    conda-forge
pycparser                 2.21               pyhd3eb1b0_0    anaconda
python                    3.7.4                h265db76_1  
pytorch                   1.2.0           cuda100py37h938c94c_0    anaconda
qt                        5.12.6               h0c8506f_0    conda-forge
readline                  7.0                  h7b6447c_5  
scikit-learn              0.21.3           py37hd81dba3_0    anaconda
scipy                     1.6.2            py37h91f5cce_0    anaconda
setuptools                65.5.1             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyhd3eb1b0_1    anaconda
sqlite                    3.33.0               h62c20be_0  
tk                        8.6.12               h1ccaba5_0  
torchvision               0.4.0           cpu_py37h1e143f5_0    anaconda
wheel                     0.38.4           py37h06a4308_0  
x264                      1!152.20180806       h7b6447c_0    anaconda
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.0.10               h7f98852_0    conda-forge
xorg-libsm                1.2.2                h470a237_5    conda-forge
xorg-libx11               1.7.2                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h7f98852_1    conda-forge
xorg-libxrender           0.9.10            h7f98852_1003    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h27cfd23_1007    anaconda
xz                        5.4.2                h5eee18b_0  
zlib                      1.2.13               h5eee18b_0  
zstd                      1.5.5                hc292b87_0    anaconda
$ uname -a
Linux mona-ThinkStation-P7 6.2.0-34-generic #34~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep  7 13:12:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
LSB Version:    core-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:   jammy
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

and

$ nvidia-smi
Mon Oct 16 13:31:35 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.125.06   Driver Version: 525.125.06   CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA RTX 6000...  Off  | 00000000:52:00.0  On |                  Off |
| 55%   82C    P2   265W / 300W |  35987MiB / 49140MiB |     74%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2159      G   /usr/lib/xorg/Xorg                624MiB |
|    0   N/A  N/A      2296      G   ...ome-remote-desktop-daemon        6MiB |
|    0   N/A  N/A      2335      G   /usr/bin/gnome-shell               76MiB |
|    0   N/A  N/A      2827      G   ...AAAAAAAAA= --shared-files       73MiB |
|    0   N/A  N/A      3242      G   ...2/usr/lib/firefox/firefox      357MiB |
|    0   N/A  N/A     99342      G   blender                           239MiB |
|    0   N/A  N/A   1402295      G   ...RendererForSitePerProcess      101MiB |
|    0   N/A  N/A   1454811      C   python                          34428MiB |
+-----------------------------------------------------------------------------+
$ cat setup.py 
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension

setup(
    name='ransac_voting',
    ext_modules=[
        CUDAExtension('ransac_voting', [
            './src/ransac_voting.cpp',
            './src/ransac_voting_kernel.cu'
        ])
    ],
    cmdclass={
        'build_ext': BuildExtension
    }
)
chensong1995 commented 1 year ago

Hi Mona,

Thanks for your follow-up! I do not think the error has anything to do with the conda environment. Can you follow the instructions here and let me know if that solves the issue?

monajalal commented 1 year ago

Yes, I just followed it and still get the same error:


(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$  sudo update-alternatives --config gcc
There is only one alternative in link group gcc (providing /usr/bin/gcc): /usr/bin/gcc-10
Nothing to configure.
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$  sudo update-alternatives --config g++ 
There is only one alternative in link group g++ (providing /usr/bin/g++): /usr/bin/g++-10
Nothing to configure.

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$ gcc --version
gcc (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$ g++ --version
g++ (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$ python setup.py build_ext --inplace
running build_ext
building 'ransac_voting' extension
/usr/bin/gcc-10 -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/TH -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/THC -I/home/mona/anaconda3/envs/hybridpose/include/python3.7m -c ./src/ransac_voting.cpp -o build/temp.linux-x86_64-cpython-37/./src/ransac_voting.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ransac_voting -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11
cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from ./src/ransac_voting.cpp:1:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:11:4: warning: #warning "Including torch/torch.h for C++ extensions is deprecated. Please include torch/extension.h" [-Wcpp]
   11 | #  warning "Including torch/torch.h for C++ extensions is deprecated. Please include torch/extension.h"
      |    ^~~~~~~
In file included from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/MemoryFormat.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:2,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
                 from /home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                 from ./src/ransac_voting.cpp:1:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/TensorImpl.h:1456:34:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<long int>::Data’ from ‘std::initializer_list<long int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
  103 |       : Data(Vec.begin() == Vec.end() ? static_cast<T*>(nullptr) : Vec.begin()),
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = unsigned char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<unsigned char>::Data’ from ‘std::initializer_list<unsigned char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = signed char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<signed char>::Data’ from ‘std::initializer_list<signed char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = short int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<short int>::Data’ from ‘std::initializer_list<short int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<int>::Data’ from ‘std::initializer_list<int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = float]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<float>::Data’ from ‘std::initializer_list<float>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = double]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<double>::Data’ from ‘std::initializer_list<double>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/usr/bin/nvcc -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/TH -I/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/THC -I/home/mona/anaconda3/envs/hybridpose/include/python3.7m -c ./src/ransac_voting_kernel.cu -o build/temp.linux-x86_64-cpython-37/./src/ransac_voting_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ransac_voting -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^ 
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/core/TensorImpl.h:1456:36:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<long int>::Data’ from ‘std::initializer_list<long int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
  102 |   /* implicit */ constexpr ArrayRef(const std::initializer_list<T>& Vec)
      |                                                                  ~~~~~~~                    ^                                         
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = unsigned char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:301:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<unsigned char>::Data’ from ‘std::initializer_list<unsigned char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = signed char]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1137:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<signed char>::Data’ from ‘std::initializer_list<signed char>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = short int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1964:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<short int>::Data’ from ‘std::initializer_list<short int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = int]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:2772:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<int>::Data’ from ‘std::initializer_list<int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = float]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:0:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<float>::Data’ from ‘std::initializer_list<float>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h: In instantiation of ‘constexpr c10::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = double]’:
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:0:   required from here
/home/mona/anaconda3/envs/hybridpose/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:102:93: warning: initializing ‘c10::ArrayRef<double>::Data’ from ‘std::initializer_list<double>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
error: command '/usr/bin/nvcc' failed with exit code 1

Please let me know what are your thoughts?

monajalal commented 1 year ago

so I switched to Python 3.10 and CUDA 11.7 since the previous version of CUDA only had support until gcc 7.

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$ sudo update-alternatives --config gcc
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection    Path             Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gcc-11   11        auto mode
  1            /usr/bin/gcc-10   10        manual mode
  2            /usr/bin/gcc-11   11        manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/gcc-10 to provide /usr/bin/gcc (gcc) in manual mode
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$ sudo update-alternatives --config g++
There are 2 choices for the alternative g++ (providing /usr/bin/g++).

  Selection    Path             Priority   Status
------------------------------------------------------------
* 0            /usr/bin/g++-11   11        auto mode
  1            /usr/bin/g++-10   10        manual mode
  2            /usr/bin/g++-11   11        manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/g++-10 to provide /usr/bin/g++ (g++) in manual mode

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$ CUDAHOSTCXX=/usr/bin/g++-10 python setup.py build_ext --inplace
running build_ext
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/utils/cpp_extension.py:387: UserWarning: The detected CUDA version (11.5) has a minor version mismatch with the version that was used to compile PyTorch (11.7). Most likely this shouldn't be a problem.
  warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'ransac_voting' extension
gcc -pthread -B /home/mona/anaconda3/envs/hybridpose/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/mona/anaconda3/envs/hybridpose/include -fPIC -O2 -isystem /home/mona/anaconda3/envs/hybridpose/include -fPIC -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/TH -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/THC -I/home/mona/anaconda3/envs/hybridpose/include/python3.10 -c ./src/ransac_voting.cpp -o build/temp.linux-x86_64-cpython-310/./src/ransac_voting.o -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=ransac_voting -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
/usr/bin/nvcc -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/TH -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/THC -I/home/mona/anaconda3/envs/hybridpose/include/python3.10 -c ./src/ransac_voting_kernel.cu -o build/temp.linux-x86_64-cpython-310/./src/ransac_voting_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=ransac_voting -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^ 
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
error: command '/usr/bin/nvcc' failed with exit code 1

I also changed the following in ransac_voting.cpp since the previous version was deprecated. However, I still get error:

#include <torch/torch.h>
#include <iostream>
#include <vector>
#include <ATen/cuda/CUDAContext.h>
#include <cuda_runtime.h>

// extern THCState* state;
cudaStream_t stream = at::cuda::getCurrentCUDAStream();

// #define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be a CUDA tensor")
#define CHECK_CUDA(x) AT_ASSERTM(x.options().device().is_cuda(), #x " must be a CUDA tensor")

I have:

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$ python
Python 3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.13.0+cu117'
>>> import logging
>>> logging.warning('cuda version: {}'.format(torch.version.cuda))
WARNING:root:cuda version: 11.7

cuda_compatibility_max_gcc_version

chensong1995 commented 1 year ago

Hi Mona,

Did you try the part that asks you to export CUDA_ROOT and create the soft links?

monajalal commented 1 year ago

I installed CUDA 11.8 and now I get two warning but no errors. Is it safe to ignore the warnings?

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose$ gcc --version
gcc (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose$ sudo update-alternatives --config gcc
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection    Path             Priority   Status
------------------------------------------------------------
  0            /usr/bin/gcc-11   11        auto mode
* 1            /usr/bin/gcc-10   10        manual mode
  2            /usr/bin/gcc-11   11        manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/gcc-11 to provide /usr/bin/gcc (gcc) in manual mode
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose$ sudo update-alternatives --config g++
There are 2 choices for the alternative g++ (providing /usr/bin/g++).

  Selection    Path             Priority   Status
------------------------------------------------------------
  0            /usr/bin/g++-11   11        auto mode
* 1            /usr/bin/g++-10   10        manual mode
  2            /usr/bin/g++-11   11        manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/g++-11 to provide /usr/bin/g++ (g++) in manual mode
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose$ g++ --version
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose$ cd lib/r
ransac_voting_gpu_layer/ regressor/               
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose$ cd lib/ransac_voting_gpu_layer/
(hybridpose) mona@mona-ThinkStation-P7:~/HybridPose/lib/ransac_voting_gpu_layer$ CUDAHOSTCXX=/usr/bin/g++-11 python setup.py build_ext --inplace
running build_ext
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/utils/cpp_extension.py:387: UserWarning: The detected CUDA version (11.8) has a minor version mismatch with the version that was used to compile PyTorch (11.7). Most likely this shouldn't be a problem.
  warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/utils/cpp_extension.py:397: UserWarning: There are no g++ version bounds defined for CUDA version 11.8
  warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'ransac_voting' extension
gcc -pthread -B /home/mona/anaconda3/envs/hybridpose/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/mona/anaconda3/envs/hybridpose/include -fPIC -O2 -isystem /home/mona/anaconda3/envs/hybridpose/include -fPIC -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/TH -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/mona/anaconda3/envs/hybridpose/include/python3.10 -c ./src/ransac_voting.cpp -o build/temp.linux-x86_64-cpython-310/./src/ransac_voting.o -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=ransac_voting -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
/usr/local/cuda-11.8/bin/nvcc -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/TH -I/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/mona/anaconda3/envs/hybridpose/include/python3.10 -c ./src/ransac_voting_kernel.cu -o build/temp.linux-x86_64-cpython-310/./src/ransac_voting_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=ransac_voting -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
./src/ransac_voting_kernel.cu: In function ‘at::Tensor generate_hypothesis_launcher(at::Tensor, at::Tensor, at::Tensor)’:
./src/ransac_voting_kernel.cu:75:53: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
   75 |     auto hypo_pts = at::zeros({hn,vn,2}, direct.type());
      |                                          ~~~~~~~~~~~^~
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:216:1: note: declared here
  216 |   DeprecatedTypeProperties & type() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:76:102: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
   76 |     generate_hypothesis_kernel<<<bdim,tdim>>>(
      |                                                                                                      ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:76:126: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
   76 |     generate_hypothesis_kernel<<<bdim,tdim>>>(
      |                                                                                                                              ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:76:146: warning: ‘T* at::Tensor::data() const [with T = int]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
   76 |     generate_hypothesis_kernel<<<bdim,tdim>>>(
      |                                                                                                                                                  ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:76:172: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
   76 |     generate_hypothesis_kernel<<<bdim,tdim>>>(
      |                                                                                                                                                                            ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu: In function ‘void voting_for_hypothesis_launcher(at::Tensor, at::Tensor, at::Tensor, at::Tensor, float)’:
./src/ransac_voting_kernel.cu:159:104: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
  159 |     voting_for_hypothesis_kernel<<<bdim,tdim>>>(
      |                                                                                                        ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:159:128: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
  159 |     voting_for_hypothesis_kernel<<<bdim,tdim>>>(
      |                                                                                                                                ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:159:154: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
  159 |     voting_for_hypothesis_kernel<<<bdim,tdim>>>(
      |                                                                                                                                                          ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:159:187: warning: ‘T* at::Tensor::data() const [with T = unsigned char]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
  159 |     voting_for_hypothesis_kernel<<<bdim,tdim>>>(
      |                                                                                                                                                                                           ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu: In function ‘at::Tensor generate_hypothesis_vanishing_point_launcher(at::Tensor, at::Tensor, at::Tensor)’:
./src/ransac_voting_kernel.cu:255:53: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
  255 |     auto hypo_pts = at::zeros({hn,vn,3}, direct.type());
      |                                          ~~~~~~~~~~~^~
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:216:1: note: declared here
  216 |   DeprecatedTypeProperties & type() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:256:118: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
  256 |     generate_hypothesis_vanishing_point_kernel<<<bdim,tdim>>>(
      |                                                                                                                      ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:256:142: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
  256 |     generate_hypothesis_vanishing_point_kernel<<<bdim,tdim>>>(
      |                                                                                                                                              ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:256:162: warning: ‘T* at::Tensor::data() const [with T = int]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
  256 |     generate_hypothesis_vanishing_point_kernel<<<bdim,tdim>>>(
      |                                                                                                                                                                  ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:256:188: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
  256 |     generate_hypothesis_vanishing_point_kernel<<<bdim,tdim>>>(
      |                                                                                                                                                                                            ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu: In function ‘void voting_for_hypothesis_vanishing_point_launcher(at::Tensor, at::Tensor, at::Tensor, at::Tensor, float)’:
./src/ransac_voting_kernel.cu:343:120: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
  343 |     voting_for_hypothesis_vanishing_point_kernel<<<bdim,tdim>>>(
      |                                                                                                                        ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:343:144: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
  343 |     voting_for_hypothesis_vanishing_point_kernel<<<bdim,tdim>>>(
      |                                                                                                                                                ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:343:170: warning: ‘T* at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
  343 |     voting_for_hypothesis_vanishing_point_kernel<<<bdim,tdim>>>(
      |                                                                                                                                                                          ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
./src/ransac_voting_kernel.cu:343:203: warning: ‘T* at::Tensor::data() const [with T = unsigned char]’ is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
  343 |     voting_for_hypothesis_vanishing_point_kernel<<<bdim,tdim>>>(
      |                                                                                                                                                                                                           ^ 
/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/include/ATen/core/TensorBody.h:238:1: note: declared here
  238 |   T * data() const {
      | ^ ~~
creating build/lib.linux-x86_64-cpython-310
g++ -pthread -B /home/mona/anaconda3/envs/hybridpose/compiler_compat -shared -Wl,-rpath,/home/mona/anaconda3/envs/hybridpose/lib -Wl,-rpath-link,/home/mona/anaconda3/envs/hybridpose/lib -L/home/mona/anaconda3/envs/hybridpose/lib -Wl,-rpath,/home/mona/anaconda3/envs/hybridpose/lib -Wl,-rpath-link,/home/mona/anaconda3/envs/hybridpose/lib -L/home/mona/anaconda3/envs/hybridpose/lib build/temp.linux-x86_64-cpython-310/./src/ransac_voting.o build/temp.linux-x86_64-cpython-310/./src/ransac_voting_kernel.o -L/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/lib -L/usr/local/cuda-11.8/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda_cu -ltorch_cuda_cpp -o build/lib.linux-x86_64-cpython-310/ransac_voting.cpython-310-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-cpython-310/ransac_voting.cpython-310-x86_64-linux-gnu.so -> 

mainly

 UserWarning: There are no g++ version bounds defined for CUDA version 11.8

and

UserWarning: The detected CUDA version (11.8) has a minor version mismatch with the version that was used to compile PyTorch (11.7). Most likely this shouldn't be a problem.
chensong1995 commented 1 year ago

Hi Mona,

Thanks for the update! These warnings should be good. To verify, you can download the pre-trained weights and see if the inference results match the metric scores reported in the paper.