Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BASICSR_EXT=True Compilation Error #410

Closed
jerrymatjila opened this issue Jun 23, 2021 · 4 comments
Closed

BASICSR_EXT=True Compilation Error #410

jerrymatjila opened this issue Jun 23, 2021 · 4 comments

Comments

@jerrymatjila
Copy link

BASICSR_EXT=True python setup.py develop gives compilation error
$ BASICSR_EXT=True python setup.py develop
running develop
running egg_info
writing basicsr.egg-info/PKG-INFO
writing dependency_links to basicsr.egg-info/dependency_links.txt
writing requirements to basicsr.egg-info/requires.txt
writing top-level names to basicsr.egg-info/top_level.txt
reading manifest file 'basicsr.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'basicsr.egg-info/SOURCES.txt'
running build_ext
building 'basicsr.ops.dcn.deform_conv_ext' extension
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/utils/cpp_extension.py:284: UserWarning: 

!! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using c++, and then you can also use
c++ to compile your extension.

See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!! WARNING !!

warnings.warn(WRONG_COMPILER_WARNING.format(
Emitting ninja build file /deepmind/github/xinntao/basicsr/build/temp.linux-x86_64-3.9/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/1] /opt/cuda/bin/nvcc  -DWITH_CUDA -I/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include -I/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/TH -I/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/THC -I/opt/cuda/include -I/storage/usr/conda/envs/basicsr/include/python3.9 -c -c /deepmind/github/xinntao/basicsr/basicsr/ops/dcn/src/deform_conv_cuda_kernel.cu -o /deepmind/github/xinntao/basicsr/build/temp.linux-x86_64-3.9/basicsr/ops/dcn/src/deform_conv_cuda_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'"'"'' -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=deform_conv_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_52,code=compute_52 -gencode=arch=compute_52,code=sm_52 -std=c++14
FAILED: /deepmind/github/xinntao/basicsr/build/temp.linux-x86_64-3.9/basicsr/ops/dcn/src/deform_conv_cuda_kernel.o 
/opt/cuda/bin/nvcc  -DWITH_CUDA -I/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include -I/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/TH -I/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/THC -I/opt/cuda/include -I/storage/usr/conda/envs/basicsr/include/python3.9 -c -c /deepmind/github/xinntao/basicsr/basicsr/ops/dcn/src/deform_conv_cuda_kernel.cu -o /deepmind/github/xinntao/basicsr/build/temp.linux-x86_64-3.9/basicsr/ops/dcn/src/deform_conv_cuda_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'"'"'' -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=deform_conv_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_52,code=compute_52 -gencode=arch=compute_52,code=sm_52 -std=c++14
/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed

/usr/include/c++/11.1.0/type_traits(1356): error: identifier "__is_same" is undefined

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Metaprogramming.h(425): error: no instance of constructor "std::tuple<_T1, _T2>::tuple [with _T1=int32_t &&, _T2=int32_t]" matches the argument list
argument types are: (int32_t, int)

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Metaprogramming.h(423): error: no instance of overloaded function "c10::guts::detail::extract_tuple_element_by_index" matches the argument list
argument types are: (std::tuple<int32_t>, <error-type>)

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/Scalar.h(32): error: no instance of constructor "c10::Scalar::Scalar" matches the argument list
argument types are: (uint8_t, __nv_bool)

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/Scalar.h(32): error: no instance of constructor "c10::Scalar::Scalar" matches the argument list
argument types are: (int8_t, __nv_bool)

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/Scalar.h(32): error: no instance of constructor "c10::Scalar::Scalar" matches the argument list
argument types are: (int16_t, __nv_bool)

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/Scalar.h(32): error: no instance of constructor "c10::Scalar::Scalar" matches the argument list
argument types are: (int, __nv_bool)

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/Scalar.h(32): error: no instance of constructor "c10::Scalar::Scalar" matches the argument list
argument types are: (int64_t, __nv_bool)

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/ScalarTypeToTypeMeta.h(34): error:no suitable constructor exists to convert from "c10::ScalarType" to "c10::optional<c10::ScalarType>"

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(148): error: no suitable constructor exists to convert from "c10::Layout" to "c10::optional<c10::Layout>"

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(177): error: no instance of overloaded function "c10::TensorOptions::set_dtype" matches the argument list
argument types are: (caffe2::TypeMeta)
object type is: c10::TensorOptions

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(182): error: no instance of overloaded function "c10::TensorOptions::set_dtype" matches the argument list
argument types are: (c10::ScalarType)
object type is: c10::TensorOptions

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(187): error: no suitable constructor exists to convert from "c10::MemoryFormat" to "c10::optional<c10::MemoryFormat>"

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(1116): error: no instance of constructor "c10::optional<T>::optional [with T=c10::Device]" matches the argument list
argument types are: (const c10::Device)
detected during instantiation of "c10::optional<std::decay<T>::type> c10::make_optional(T &&) [with T=constc10::Device &]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(287): here

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(1116): error: no instance of constructor "c10::optional<T>::optional [with T=caffe2::TypeMeta]" matches the argument list
argument types are: (const caffe2::TypeMeta)
detected during instantiation of "c10::optional<std::decay<T>::type> c10::make_optional(T &&) [with T=constcaffe2::TypeMeta &]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(308): here

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(1116): error: no instance of constructor "c10::optional<T>::optional [with T=c10::Layout]" matches the argument list
argument types are: (const c10::Layout)
detected during instantiation of "c10::optional<std::decay<T>::type> c10::make_optional(T &&) [with T=constc10::Layout &]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(324): here

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(1116): error: no instance of constructor "c10::optional<T>::optional [with T=__nv_bool]" matches the argument list
argument types are: (const __nv_bool)
detected during instantiation of "c10::optional<std::decay<T>::type> c10::make_optional(T &&) [with T=const__nv_bool &]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(341): here

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(1116): error: no instance of constructor "c10::optional<T>::optional [with T=c10::MemoryFormat]" matches the argument list
argument types are: (const c10::MemoryFormat)
detected during instantiation of "c10::optional<std::decay<T>::type> c10::make_optional(T &&) [with T=constc10::MemoryFormat &]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(388): here

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(430): error: no suitable constructor exists to convert from "c10::MemoryFormat" to "c10::optional<c10::MemoryFormat>"

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(568): error: no instance of overloaded function "c10::TensorOptions::dtype" matches the argument list
argument types are: (caffe2::TypeMeta)
object type is: c10::TensorOptions

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(573): error: no instance of overloaded function "c10::TensorOptions::dtype" matches the argument list
argument types are: (caffe2::TypeMeta)
object type is: c10::TensorOptions

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(579): error: no instance of overloaded function "c10::TensorOptions::layout" matches the argument list
argument types are: (c10::Layout)
object type is: c10::TensorOptions

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(597): error: no instance of overloaded function "c10::TensorOptions::requires_grad" matches the argument list
argument types are: (__nv_bool)
object type is: c10::TensorOptions

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(603): error: no suitable constructor exists to convert from "c10::MemoryFormat" to "c10::optional<c10::MemoryFormat>"

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorOptions.h(795): error: no instance of overloaded function "c10::TensorOptions::layout" matches the argument list
argument types are: (c10::Layout)
object type is: c10::TensorOptions

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(585): error: class "std::enable_if<<error-constant>, c10::optional<c10::Device> &>" has no member "type"
detected during instantiation of "c10::optional<T>::operator= [with T=c10::Device]" based on template argument <c10::Device> 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorImpl.h(1562): here

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/TensorImpl.h(2179): error: static assertion failed with "You changed the size of TensorImpl on 64-bit arch.See Note [TensorImpl size constraints] on how to proceed."

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/DeprecatedTypeProperties.h(99): error: no instance of overloaded function "c10::TensorOptions::dtype" matches the argument list
argument types are: (caffe2::TypeMeta)
object type is: c10::TensorOptions

/usr/include/c++/11.1.0/type_traits(2514): error: class "std::enable_if<<error-constant>, c10::complex<float>>" has no member "type"
detected during:
instantiation of type "std::enable_if_t<<error-constant>, c10::complex<float>>" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/complex.h(169): here
instantiation of "c10::complex<T>::complex [with T=double]" based on template argument <double> 
(906): here
instantiation of class "std::__is_constructible_impl<_Tp, _Args...> [with _Tp=c10::Scalar, _Args=<const c10::nullopt_t &>]" 
(912): here
instantiation of class "std::is_constructible<_Tp, _Args...> [with _Tp=c10::Scalar, _Args=<const c10::nullopt_t &>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h(828): here

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h(668): error: no suitable user-defined conversion from "const at::Tensor" to "const c10::optional<at::Tensor>" exists

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h(670): error: no suitable user-defined conversion from "const at::Tensor" to "const c10::optional<at::Tensor>" exists

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::complex<double>, _Up=c10::Device]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/Formatting.h(30): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::complex<double>, _Up=c10::Device]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/Formatting.h(30): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=const char *, _Up=__nv_bool]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/Formatting.h(33): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=const char *, _Up=__nv_bool]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/Formatting.h(33): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::TensorImpl *, _Up=c10::TensorImpl *]" 
/usr/include/c++/11.1.0/bits/stl_vector.h(401): here
instantiation of class "std::vector<_Tp, _Alloc> [with _Tp=c10::TensorImpl *, _Alloc=std::allocator<c10::TensorImpl *>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/Utils.h(52): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::TensorImpl *, _Up=c10::TensorImpl *]" 
/usr/include/c++/11.1.0/bits/stl_vector.h(401): here
instantiation of class "std::vector<_Tp, _Alloc> [with _Tp=c10::TensorImpl *, _Alloc=std::allocator<c10::TensorImpl *>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/Utils.h(52): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<float>, _Up=c10::nullopt_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(455): here
instantiation of class "c10::optional<T> [with T=float]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/CPUGeneratorImpl.h(35): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<float>, _Up=c10::nullopt_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(455): here
instantiation of class "c10::optional<T> [with T=float]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/CPUGeneratorImpl.h(35): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<float>, _Up=c10::in_place_t]"
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(458): here
instantiation of class "c10::optional<T> [with T=float]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/CPUGeneratorImpl.h(35): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<float>, _Up=c10::in_place_t]"
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(458): here
instantiation of class "c10::optional<T> [with T=float]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/CPUGeneratorImpl.h(35): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<c10::QEngine>, _Up=c10::nullopt_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(455): here
instantiation of class "c10::optional<T> [with T=c10::QEngine]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/Context.h(241): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<c10::QEngine>, _Up=c10::nullopt_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(455): here
instantiation of class "c10::optional<T> [with T=c10::QEngine]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/Context.h(241): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<c10::QEngine>, _Up=c10::in_place_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(458): here
instantiation of class "c10::optional<T> [with T=c10::QEngine]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/Context.h(241): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<c10::QEngine>, _Up=c10::in_place_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(458): here
instantiation of class "c10::optional<T> [with T=c10::QEngine]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/Context.h(241): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::nullopt_t, _Up=c10::optional<c10::QEngine>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/Context.h(241): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::nullopt_t, _Up=c10::optional<c10::QEngine>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/Context.h(241): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::impl::VirtualGuardImpl, _Up=c10::impl::VirtualGuardImpl]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(31): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::impl::VirtualGuardImpl, _Up=c10::impl::VirtualGuardImpl]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(31): here

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(31): error: no instance of constructor "c10::impl::InlineDeviceGuard<T>::InlineDeviceGuard [with T=c10::impl::VirtualGuardImpl]" matches the argument list
argument types are: (c10::Device, const c10::impl::DeviceGuardImplInterface *)

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(50): error: more than one instance of overloaded function "c10::impl::InlineDeviceGuard<T>::reset_device [with T=c10::impl::VirtualGuardImpl]" matches the argument list:
function template "std::enable_if<<expression>, void>::type c10::impl::InlineDeviceGuard<T>::reset_device(c10::Device) [with T=c10::impl::VirtualGuardImpl]"
function template "std::enable_if<std::is_same<U, c10::impl::VirtualGuardImpl>::value, void>::type c10::impl::InlineDeviceGuard<T>::reset_device(c10::Device, const c10::impl::DeviceGuardImplInterface *) [with T=c10::impl::VirtualGuardImpl]"
argument types are: (c10::Device)
object type is: c10::impl::InlineDeviceGuard<c10::impl::VirtualGuardImpl>

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/impl/InlineDeviceGuard.h(158): error: class "std::enable_if<<error-constant>, void>" has no member "type"
detected during instantiation of "c10::impl::InlineDeviceGuard<T>::reset_device [with T=c10::impl::VirtualGuardImpl]" based on template argument <c10::impl::VirtualGuardImpl> 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(57): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<c10::impl::InlineDeviceGuard<c10::impl::VirtualGuardImpl>>, _Up=c10::nullopt_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(455): here
instantiation of class "c10::optional<T> [with T=c10::impl::InlineDeviceGuard<c10::impl::VirtualGuardImpl>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/impl/InlineDeviceGuard.h(427): here
instantiation of class "c10::impl::InlineOptionalDeviceGuard<T> [with T=c10::impl::VirtualGuardImpl]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(178): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<c10::impl::InlineDeviceGuard<c10::impl::VirtualGuardImpl>>, _Up=c10::nullopt_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(455): here
instantiation of class "c10::optional<T> [with T=c10::impl::InlineDeviceGuard<c10::impl::VirtualGuardImpl>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/impl/InlineDeviceGuard.h(427): here
instantiation of class "c10::impl::InlineOptionalDeviceGuard<T> [with T=c10::impl::VirtualGuardImpl]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(178): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<c10::impl::InlineDeviceGuard<c10::impl::VirtualGuardImpl>>, _Up=c10::in_place_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(458): here
instantiation of class "c10::optional<T> [with T=c10::impl::InlineDeviceGuard<c10::impl::VirtualGuardImpl>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/impl/InlineDeviceGuard.h(427): here
instantiation of class "c10::impl::InlineOptionalDeviceGuard<T> [with T=c10::impl::VirtualGuardImpl]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(178): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<c10::impl::InlineDeviceGuard<c10::impl::VirtualGuardImpl>>, _Up=c10::in_place_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(458): here
instantiation of class "c10::optional<T> [with T=c10::impl::InlineDeviceGuard<c10::impl::VirtualGuardImpl>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/impl/InlineDeviceGuard.h(427): here
instantiation of class "c10::impl::InlineOptionalDeviceGuard<T> [with T=c10::impl::VirtualGuardImpl]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(178): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<int8_t>, _Up=c10::nullopt_t]"
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(455): here
instantiation of class "c10::optional<T> [with T=c10::DeviceIndex]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(130): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<int8_t>, _Up=c10::nullopt_t]"
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(455): here
instantiation of class "c10::optional<T> [with T=c10::DeviceIndex]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(130): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::Device, _Up=c10::optional<c10::DeviceIndex>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(130): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::Device, _Up=c10::optional<c10::DeviceIndex>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(130): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optional<c10::Device>, _Up=c10::optional<c10::DeviceIndex>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(134): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optional<c10::Device>, _Up=c10::optional<c10::DeviceIndex>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(134): here

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(156): error: no instance of overloaded function "c10::impl::InlineOptionalDeviceGuard<T>::reset_device [with T=c10::impl::VirtualGuardImpl]" matches the argument list
argument types are: (c10::Device)
object type is: c10::impl::InlineOptionalDeviceGuard<c10::impl::VirtualGuardImpl>

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/core/DeviceGuard.h(163): error: no instance of overloaded function "c10::impl::InlineOptionalDeviceGuard<T>::reset_device [with T=c10::impl::VirtualGuardImpl]" matches the argument list
argument types are: (c10::Device, const c10::impl::DeviceGuardImplInterface *)
object type is: c10::impl::InlineOptionalDeviceGuard<c10::impl::VirtualGuardImpl>

/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(1116): error: no instance of constructor "c10::optional<T>::optional [with T=c10::Device]" matches the argument list
argument types are: (c10::Device)
detected during instantiation of "c10::optional<std::decay<T>::type> c10::make_optional(T &&) [with T=c10::Device]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/DeviceGuard.h(19): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::basic_string_view<char>, _Up=c10::Device]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/blob.h(206): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::basic_string_view<char>, _Up=c10::Device]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/blob.h(206): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::IValue, _Up=__nv_bool]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/ivalue.h(208): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::IValue, _Up=__nv_bool]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/ivalue.h(208): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::string, _Up=__nv_bool]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/ivalue.h(557): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::string, _Up=__nv_bool]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/ivalue.h(557): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=__nv_bool, _Up=__nv_bool]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/ivalue.h(711): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=__nv_bool, _Up=__nv_bool]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/ivalue.h(711): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::IValue, _Up=c10::IValue]" 
/usr/include/c++/11.1.0/bits/stl_vector.h(401): here
instantiation of class "std::vector<_Tp, _Alloc> [with _Tp=c10::IValue, _Alloc=std::allocator<c10::IValue>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/List.h(31): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::IValue, _Up=c10::IValue]" 
/usr/include/c++/11.1.0/bits/stl_vector.h(401): here
instantiation of class "std::vector<_Tp, _Alloc> [with _Tp=c10::IValue, _Alloc=std::allocator<c10::IValue>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/List.h(31): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<std::string>, _Up=c10::nullopt_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(455): here
instantiation of class "c10::optional<T> [with T=std::string]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(107): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<std::string>, _Up=c10::nullopt_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(455): here
instantiation of class "c10::optional<T> [with T=std::string]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(107): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<std::string>, _Up=c10::in_place_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(458): here
instantiation of class "c10::optional<T> [with T=std::string]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(107): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<std::string>, _Up=c10::in_place_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(458): here
instantiation of class "c10::optional<T> [with T=std::string]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(107): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optional<std::string>, _Up=c10::in_place_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(107): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optional<std::string>, _Up=c10::in_place_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(107): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optional<std::string>, _Up=c10::optional<std::string>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(107): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optional<std::string>, _Up=c10::optional<std::string>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(107): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::TypePrinter, _Up=std::function<c10::optional<std::string> (const c10::ConstTypePtr &)>]" 
(149): here
instantiation of class "std::__not_<_Pp> [with _Pp=std::is_same<c10::TypePrinter, std::function<c10::optional<std::string> (const c10::ConstTypePtr &)>>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(111): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::TypePrinter, _Up=std::function<c10::optional<std::string> (const c10::ConstTypePtr &)>]" 
(149): here
instantiation of class "std::__not_<_Pp> [with _Pp=std::is_same<c10::TypePrinter, std::function<c10::optional<std::string> (const c10::ConstTypePtr &)>>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(111): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::nullptr_t, _Up=std::function<c10::optional<std::string> (const c10::ConstTypePtr &)>]" 
(149): here
instantiation of class "std::__not_<_Pp> [with _Pp=std::is_same<std::nullptr_t, std::function<c10::optional<std::string> (const c10::ConstTypePtr &)>>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(116): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::nullptr_t, _Up=std::function<c10::optional<std::string> (const c10::ConstTypePtr &)>]" 
(149): here
instantiation of class "std::__not_<_Pp> [with _Pp=std::is_same<std::nullptr_t, std::function<c10::optional<std::string> (const c10::ConstTypePtr &)>>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(116): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::TypePtr, _Up=c10::TypePtr]" 
/usr/include/c++/11.1.0/bits/stl_vector.h(401): here
instantiation of class "std::vector<_Tp, _Alloc> [with _Tp=c10::TypePtr, _Alloc=std::allocator<c10::TypePtr>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(204): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::TypePtr, _Up=c10::TypePtr]" 
/usr/include/c++/11.1.0/bits/stl_vector.h(401): here
instantiation of class "std::vector<_Tp, _Alloc> [with _Tp=c10::TypePtr, _Alloc=std::allocator<c10::TypePtr>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/jit_type_base.h(204): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::reference_wrapper<const std::string>, _Up=c10::trivially_copyable_optimization_optional_base<std::reference_wrapper<const std::string>>]" 
(906): here
instantiation of class "std::__is_constructible_impl<_Tp, _Args...> [with _Tp=c10::trivially_copyable_optimization_optional_base<std::reference_wrapper<const std::string>>, _Args=<const c10::trivially_copyable_optimization_optional_base<std::reference_wrapper<const std::string>> &>]" 
(936): here
instantiation of class "std::__is_copy_constructible_impl<_Tp, true> [with _Tp=c10::trivially_copyable_optimization_optional_base<std::reference_wrapper<const std::string>>]" 
(942): here
instantiation of class "std::is_copy_constructible<_Tp> [with _Tp=c10::trivially_copyable_optimization_optional_base<std::reference_wrapper<const std::string>>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(408): here
instantiation of type "c10::OptionalBase<std::reference_wrapper<const std::string>>" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(427): here
instantiation of class "c10::optional<T> [with T=std::reference_wrapper<const std::string>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/List_inl.h(180): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::reference_wrapper<const std::string>, _Up=c10::trivially_copyable_optimization_optional_base<std::reference_wrapper<const std::string>>]" 
(906): here
instantiation of class "std::__is_constructible_impl<_Tp, _Args...> [with _Tp=c10::trivially_copyable_optimization_optional_base<std::reference_wrapper<const std::string>>, _Args=<const c10::trivially_copyable_optimization_optional_base<std::reference_wrapper<const std::string>> &>]" 
(936): here
instantiation of class "std::__is_copy_constructible_impl<_Tp, true> [with _Tp=c10::trivially_copyable_optimization_optional_base<std::reference_wrapper<const std::string>>]" 
(942): here
instantiation of class "std::is_copy_constructible<_Tp> [with _Tp=c10::trivially_copyable_optimization_optional_base<std::reference_wrapper<const std::string>>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(408): here
instantiation of type "c10::OptionalBase<std::reference_wrapper<const std::string>>" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(427): here
instantiation of class "c10::optional<T> [with T=std::reference_wrapper<const std::string>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/List_inl.h(180): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<std::reference_wrapper<const std::string>>, _Up=c10::nullopt_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(455): here
instantiation of class "c10::optional<T> [with T=std::reference_wrapper<const std::string>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/List_inl.h(180): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<std::reference_wrapper<const std::string>>, _Up=c10::nullopt_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(455): here
instantiation of class "c10::optional<T> [with T=std::reference_wrapper<const std::string>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/List_inl.h(180): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<std::reference_wrapper<const std::string>>, _Up=c10::in_place_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(458): here
instantiation of class "c10::optional<T> [with T=std::reference_wrapper<const std::string>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/List_inl.h(180): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::__remove_cv_t<std::reference_wrapper<const std::string>>, _Up=c10::in_place_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/c10/util/Optional.h(458): here
instantiation of class "c10::optional<T> [with T=std::reference_wrapper<const std::string>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/List_inl.h(180): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::reference_wrapper<const std::string>, _Up=c10::optional<std::reference_wrapper<const std::string>>]" 
(906): here
instantiation of class "std::__is_constructible_impl<_Tp, _Args...> [with _Tp=std::reference_wrapper<const std::string>, _Args=<c10::optional<std::reference_wrapper<const std::string>> &&>]" 
(912): here
instantiation of class "std::is_constructible<_Tp, _Args...> [with _Tp=std::reference_wrapper<const std::string>, _Args=<c10::optional<std::reference_wrapper<const std::string>> &&>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/List_inl.h(181): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::reference_wrapper<const std::string>, _Up=c10::optional<std::reference_wrapper<const std::string>>]" 
(906): here
instantiation of class "std::__is_constructible_impl<_Tp, _Args...> [with _Tp=std::reference_wrapper<const std::string>, _Args=<c10::optional<std::reference_wrapper<const std::string>> &&>]" 
(912): here
instantiation of class "std::is_constructible<_Tp, _Args...> [with _Tp=std::reference_wrapper<const std::string>, _Args=<c10::optional<std::reference_wrapper<const std::string>> &&>]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/List_inl.h(181): here

/usr/include/c++/11.1.0/type_traits(1356): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optional<std::reference_wrapper<const std::string>>, _Up=c10::in_place_t]" 
/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/include/ATen/core/List_inl.h(181): here

Error limit reached.
100 errors detected in the compilation of "/deepmind/github/xinntao/basicsr/basicsr/ops/dcn/src/deform_conv_cuda_kernel.cu".
Compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1666, in _run_ninja_build
subprocess.run(
File "/storage/usr/conda/envs/basicsr/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/deepmind/github/xinntao/basicsr/setup.py", line 140, in <module>
setup(
File "/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/storage/usr/conda/envs/basicsr/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/storage/usr/conda/envs/basicsr/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/storage/usr/conda/envs/basicsr/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/setuptools/command/develop.py", line 34, in run
self.install_for_development()
File "/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/setuptools/command/develop.py", line 136, in install_for_development
self.run_command('build_ext')
File "/storage/usr/conda/envs/basicsr/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/storage/usr/conda/envs/basicsr/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/storage/usr/conda/envs/basicsr/lib/python3.9/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 709, in build_extensions
build_ext.build_extensions(self)
File "/storage/usr/conda/envs/basicsr/lib/python3.9/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/storage/usr/conda/envs/basicsr/lib/python3.9/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "/storage/usr/conda/envs/basicsr/lib/python3.9/distutils/command/build_ext.py", line 529, in build_extension
objects = self.compiler.compile(sources,
File "/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 530, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1355, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/storage/usr/conda/envs/basicsr/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1682, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

Any idea what could be causing that compilation error?

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Oct_12_20:09:46_PDT_2020
Cuda compilation tools, release 11.1, V11.1.105
Build cuda_11.1.TC455_06.29190527_0
$ gcc --version
gcc (GCC) 11.1.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.
@wwhio
Copy link
Contributor

wwhio commented Jun 23, 2021

can you provide the output of torch.__config__.show() ?

@jerrymatjila
Copy link
Author

$ python
Python 3.9.5 | packaged by conda-forge | (default, Jun 19 2021, 00:32:32)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__config__.show()
'PyTorch built with:\n  - GCC 7.3\n  - C++ Version: 201402\n  - Intel(R) oneAPI Math Kernel Library Version 2021.2-Product Build 20210312 for Intel(R) 64 architecture applications\n  - Intel(R) MKL-DNN v2.1.2 (Git Hash 98be7e8afa711dc9b66c8ff3504129cb82013cdb)\n  - OpenMP 201511 (a.k.a. OpenMP 4.5)\n  - NNPACK is enabled\n  - CPU capability usage: AVX2\n  - CUDA Runtime 11.1\n  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37\n  - CuDNN 8.0.5\n  - Magma 2.5.2\n  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.9.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, \n'
>>>

@wwhio
Copy link
Contributor

wwhio commented Jun 23, 2021

It looks like the pytorch used in your environment is built with GCC 7.3. Try to install gcc 7 by sudo apt-get install gcc-7 g++-7 (ubuntu), and use update-alternative to choose gcc 7.

@jerrymatjila
Copy link
Author

@wwhio your suggested solution works. Solution is to update conda to use gcc 7.3.0 as follows:

conda install gcc_linux-64=7.3.0 gxx_linux-64=7.3.0

I think the installation guide should be updated with the above command/comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants