ryanxingql / stdf-pytorch

Implementation of "Spatio-Temporal Deformable Convolution for Compressed Video Quality Enhancement" (AAAI'20).
https://www.aiide.org/ojs/index.php/AAAI/article/view/6697
Apache License 2.0
155 stars 20 forks source link

help #15

Closed zwhua006 closed 2 years ago

zwhua006 commented 2 years ago

I can't install dcnv2,my version is cuda10.1 cudnn 7.6.5 gcc 7.5.0 python 3.7.6 pytorch 1.6.0 the error is: FAILED: /home/zwhua/STDF-PyTorch/ops/dcn/build/temp.linux-x86_64-3.7/src/deform_conv_cuda_kernel.o /usr/local/cuda-10.1/bin/nvcc -I/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include -I/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/TH -I/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.1/include -I/home/zwhua/anaconda3/envs/stdf/include/python3.7m -c -c /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu -o /home/zwhua/STDF-PyTorch/ops/dcn/build/temp.linux-x86_64-3.7/src/deform_conv_cuda_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=deform_conv_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14 /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu: In lambda function: /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu:258:45: 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] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:268:1: note: declared here DeprecatedTypeProperties & type() const { ^ ~~ /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu:258:100: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated: passing at::DeprecatedTypeProperties to an AT_DISPATCH macro is deprecated, pass an at::ScalarType instead [-Wdeprecated-declarations] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/Dispatch.h:66:1: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties& t) { ^~~ /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu: In lambda function: /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu:352:46: 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] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:268:1: note: declared here DeprecatedTypeProperties & type() const { ^ ~~ /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu:352:101: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated: passing at::DeprecatedTypeProperties to an AT_DISPATCH macro is deprecated, pass an at::ScalarType instead [-Wdeprecated-declarations] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/Dispatch.h:66:1: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties& t) { ^~~ /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu: In lambda function: /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu:450:46: 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] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:268:1: note: declared here DeprecatedTypeProperties & type() const { ^ ~~ /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu:450:101: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated: passing at::DeprecatedTypeProperties to an AT_DISPATCH macro is deprecated, pass an at::ScalarType instead [-Wdeprecated-declarations] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/Dispatch.h:66:1: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties& t) { ^~~ /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu: In lambda function: /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu:780:45: 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] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:268:1: note: declared here DeprecatedTypeProperties & type() const { ^ ~~ /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu:780:100: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated: passing at::DeprecatedTypeProperties to an AT_DISPATCH macro is deprecated, pass an at::ScalarType instead [-Wdeprecated-declarations] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/Dispatch.h:66:1: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties& t) { ^~~ /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu: In lambda function: /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu:812:46: 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] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:268:1: note: declared here DeprecatedTypeProperties & type() const { ^ ~~ /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu:812:101: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated: passing at::DeprecatedTypeProperties to an AT_DISPATCH macro is deprecated, pass an at::ScalarType instead [-Wdeprecated-declarations] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/Dispatch.h:66:1: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties& t) { ^~~ /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu: In lambda function: /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu:845:46: 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] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:268:1: note: declared here DeprecatedTypeProperties & type() const { ^ ~~ /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda_kernel.cu:845:101: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated: passing at::DeprecatedTypeProperties to an AT_DISPATCH macro is deprecated, pass an at::ScalarType instead [-Wdeprecated-declarations] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/Dispatch.h:66:1: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties& t) { ^~~ /usr/include/c++/7/bits/basic_string.tcc: In instantiation of ‘static std::basic_string<_CharT, _Traits, _Alloc>::_Rep std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_create(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char16_t; _Traits = std::char_traits; _Alloc = std::allocator; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’: /usr/include/c++/7/bits/basic_string.tcc:578:28: required from ‘static _CharT std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&, std::forward_iterator_tag) [with _FwdIterator = const char16_t; _CharT = char16_t; _Traits = std::char_traits; _Alloc = std::allocator]’ /usr/include/c++/7/bits/basic_string.h:5042:20: required from ‘static _CharT std::basic_string<_CharT, _Traits, _Alloc>::_S_construct_aux(_InIterator, _InIterator, const _Alloc&, std::false_type) [with _InIterator = const char16_t; _CharT = char16_t; _Traits = std::char_traits; _Alloc = std::allocator]’ /usr/include/c++/7/bits/basic_string.h:5063:24: required from ‘static _CharT std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&) [with _InIterator = const char16_t; _CharT = char16_t; _Traits = std::char_traits; _Alloc = std::allocator]’ /usr/include/c++/7/bits/basic_string.tcc:656:134: required from ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char16_t; _Traits = std::char_traits; _Alloc = std::allocator; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’ /usr/include/c++/7/bits/basic_string.h:6688:95: required from here /usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char16_t; _Traits = std::char_traits; _Alloc = std::allocator]’ without object __p->_M_set_sharable();


/usr/include/c++/7/bits/basic_string.tcc: In instantiation of ‘static std::basic_string<_CharT, _Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_create(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’:
/usr/include/c++/7/bits/basic_string.tcc:578:28:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&, std::forward_iterator_tag) [with _FwdIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
/usr/include/c++/7/bits/basic_string.h:5042:20:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct_aux(_InIterator, _InIterator, const _Alloc&, std::__false_type) [with _InIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
/usr/include/c++/7/bits/basic_string.h:5063:24:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&) [with _InIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
/usr/include/c++/7/bits/basic_string.tcc:656:134:   required from ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’
/usr/include/c++/7/bits/basic_string.h:6693:95:   required from here
/usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’ without object
[2/2] c++ -MMD -MF /home/zwhua/STDF-PyTorch/ops/dcn/build/temp.linux-x86_64-3.7/src/deform_conv_cuda.o.d -pthread -B /home/zwhua/anaconda3/envs/stdf/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include -I/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/TH -I/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-10.1/include -I/home/zwhua/anaconda3/envs/stdf/include/python3.7m -c -c /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda.cpp -o /home/zwhua/STDF-PyTorch/ops/dcn/build/temp.linux-x86_64-3.7/src/deform_conv_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=deform_conv_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/Parallel.h:149:0,
                 from /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
                 from /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
                 from /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
                 from /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                 from /home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/torch/extension.h:4,
                 from /home/zwhua/STDF-PyTorch/ops/dcn/src/deform_conv_cuda.cpp:4:
/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/include/ATen/ParallelOpenMP.h:84:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
 #pragma omp parallel for if ((end - begin) >= grain_size)

ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1515, in _run_ninja_build
    env=env)
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 12, in <module>
    cmdclass={'build_ext': BuildExtension})
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run
    _build_ext.run(self)
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 649, in build_extensions
    build_ext.build_extensions(self)
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
    _build_ext.build_extension(self, ext)
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension
    depends=ext.depends)
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 478, in unix_wrap_ninja_compile
    with_cuda=with_cuda)
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1233, in _write_ninja_file_and_compile_objects
    error_prefix='Error compiling objects for extension')
  File "/home/zwhua/anaconda3/envs/stdf/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1529, in _run_ninja_build
    raise RuntimeError(message)
RuntimeError: Error compiling objects for extension
thanks
ryanxingql commented 2 years ago

Hi zwhua006 I am not familiar with this issue. Maybe you should fix this error: subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1..

zwhua006 commented 2 years ago

thanks. when I modify '['ninja', '-v']' to ['ninja','--version'],the new error appears g++: error: /home/zwhua/STDF-PyTorch/ops/dcn/build/temp.linux-x86_64-3.7/src/deform_conv_cuda.o: 没有那个文件或目录 g++: error: /home/zwhua/STDF-PyTorch/ops/dcn/build/temp.linux-x86_64-3.7/src/deform_conv_cuda_kernel.o: 没有那个文件或目录 error: command 'g++' failed with exit status 1 but if I use ['ninja', '-v'],the error mentioned before still exists。 So, I want to confirm whether my version is correct cuda10.1 cudnn 7.6.5 gcc 7.5.0 python 3.7.6 pytorch 1.6.0,ninja 1.10.2.git re2c 2.2. Or Can you give me a set of correct version information, I will start over.

ryanxingql commented 2 years ago

Hi zwhhua006, My version: Ubuntu 20.04 CUDA 10.1 GCC 9.3.0 Python 3.7 PyTorch 1.6.0 ninja 1.10.0