When I am following the steps in GETTING_STARTED.md, in step "d", I get the following error:
./mmcv/ops/csrc/pytorch/contour_expand.cpp: In function ‘std::vector<std::vector<int> > contour_expand(at::Tensor, at::Tensor, int, int)’: ./mmcv/ops/csrc/pytorch/contour_expand.cpp:101:47: error: expected primary-expression before ‘>’ token 101 | auto ptr_data = kernel_mask.data_ptr<uint8_t>(); | ^ ./mmcv/ops/csrc/pytorch/contour_expand.cpp:101:49: error: expected primary-expression before ‘)’ token 101 | auto ptr_data = kernel_mask.data_ptr<uint8_t>(); | ^ ./mmcv/ops/csrc/pytorch/contour_expand.cpp:104:63: error: expected primary-expression before ‘>’ token 104 | auto data_label_map = internal_kernel_label.data_ptr<int32_t>(); | ^ ./mmcv/ops/csrc/pytorch/contour_expand.cpp:104:65: error: expected primary-expression before ‘)’ token 104 | auto data_label_map = internal_kernel_label.data_ptr<int32_t>(); | ^ In file included from /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/c10/core/MemoryFormat.h:5, from /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:5, from /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:2, from /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/Context.h:4, from /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5, from /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /tmp/easy_install-b9kflikk/mmcv-2.0.0/mmcv/ops/csrc/common/pytorch_cpp_helper.hpp:3, from ./mmcv/ops/csrc/pytorch/contour_expand.cpp:6: /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/c10/core/TensorImpl.h:1456:34: required from here /localhome/soa32/anaconda3/envs/skl/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()), /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here /localhome/soa32/anaconda3/envs/skl/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] /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here /localhome/soa32/anaconda3/envs/skl/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] /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here /localhome/soa32/anaconda3/envs/skl/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] /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here /localhome/soa32/anaconda3/envs/skl/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] /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here /localhome/soa32/anaconda3/envs/skl/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] /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here /localhome/soa32/anaconda3/envs/skl/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] error: Setup script exited with error: command '/usr/bin/gcc' failed with exit code 1
I tried multiple things, but it does not get resolved. Does anyone know how to resolve this error?
When I am following the steps in GETTING_STARTED.md, in step "d", I get the following error:
./mmcv/ops/csrc/pytorch/contour_expand.cpp: In function ‘std::vector<std::vector<int> > contour_expand(at::Tensor, at::Tensor, int, int)’: ./mmcv/ops/csrc/pytorch/contour_expand.cpp:101:47: error: expected primary-expression before ‘>’ token 101 | auto ptr_data = kernel_mask.data_ptr<uint8_t>(); | ^ ./mmcv/ops/csrc/pytorch/contour_expand.cpp:101:49: error: expected primary-expression before ‘)’ token 101 | auto ptr_data = kernel_mask.data_ptr<uint8_t>(); | ^ ./mmcv/ops/csrc/pytorch/contour_expand.cpp:104:63: error: expected primary-expression before ‘>’ token 104 | auto data_label_map = internal_kernel_label.data_ptr<int32_t>(); | ^ ./mmcv/ops/csrc/pytorch/contour_expand.cpp:104:65: error: expected primary-expression before ‘)’ token 104 | auto data_label_map = internal_kernel_label.data_ptr<int32_t>(); | ^ In file included from /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/c10/core/MemoryFormat.h:5, from /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/core/Tensor.h:5, from /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:2, from /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/Context.h:4, from /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5, from /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /tmp/easy_install-b9kflikk/mmcv-2.0.0/mmcv/ops/csrc/common/pytorch_cpp_helper.hpp:3, from ./mmcv/ops/csrc/pytorch/contour_expand.cpp:6: /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/c10/core/TensorImpl.h:1456:34: required from here /localhome/soa32/anaconda3/envs/skl/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()), /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here /localhome/soa32/anaconda3/envs/skl/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] /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here /localhome/soa32/anaconda3/envs/skl/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] /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here /localhome/soa32/anaconda3/envs/skl/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] /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here /localhome/soa32/anaconda3/envs/skl/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] /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here /localhome/soa32/anaconda3/envs/skl/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] /localhome/soa32/anaconda3/envs/skl/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]’: /localhome/soa32/anaconda3/envs/skl/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here /localhome/soa32/anaconda3/envs/skl/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] error: Setup script exited with error: command '/usr/bin/gcc' failed with exit code 1I tried multiple things, but it does not get resolved. Does anyone know how to resolve this error?