Scalsol / mega.pytorch

Memory Enhanced Global-Local Aggregation for Video Object Detection, CVPR2020
Other
570 stars 116 forks source link

Error in building mega_core #40

Closed hyperparameters closed 4 years ago

hyperparameters commented 4 years ago

I followed install.md when running command
python setup.py build develop

nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Apr_24_19:10:27_PDT_2019
Cuda compilation tools, release 10.1, V10.1.168

gcc -version

gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 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.

some of the output that state failed warnings

running build
running build_py
running build_ext
building 'mega_core._C' extension
creating /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6
creating /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home
creating /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan
creating /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od
creating /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od/MEGA
creating /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od/MEGA/mega.pytorch
creating /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od/MEGA/mega.pytorch/mega_core
creating /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc
creating /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cpu
creating /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda
Emitting ninja build file /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/11] /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_pool_cuda.cu -o /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_pool_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14
FAILED: /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_pool_cuda.o 
/usr/local/cuda/bin/nvcc -DWITH_CUDA -I/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_pool_cuda.cu -o /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_pool_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14
/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_pool_cuda.cu(42): error: identifier "AT_CHECK" is undefined

/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_pool_cuda.cu(68): error: identifier "AT_CHECK" is undefined

2 errors detected in the compilation of "/tmp/tmpxft_00000243_00000000-6_deform_pool_cuda.cpp1.ii".
[2/11] /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_conv_cuda.cu -o /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14
FAILED: /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_conv_cuda.o 
/usr/local/cuda/bin/nvcc -DWITH_CUDA -I/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_conv_cuda.cu -o /home/jovyan/od/MEGA/mega.pytorch/build/temp.linux-x86_64-3.6/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14
/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_conv_cuda.cu(72): error: identifier "AT_CHECK" is undefined

/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_conv_cuda.cu(200): error: identifier "AT_CHECK" is undefined

/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_conv_cuda.cu(307): error: identifier "AT_CHECK" is undefined

/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_conv_cuda.cu(423): error: identifier "AT_CHECK" is undefined

/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_conv_cuda.cu(504): error: identifier "AT_CHECK" is undefined

/home/jovyan/od/MEGA/mega.pytorch/mega_core/csrc/cuda/deform_conv_cuda.cu(586): error: identifier "AT_CHECK" is undefined

6 errors detected in the compilation of "/tmp/tmpxft_00000240_00000000-6_deform_conv_cuda.cpp1.ii".

last part of the terminal output the complete output is too big.. if you would need i'll post it

ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1423, in _run_ninja_build
    check=True)
  File "/opt/conda/lib/python3.6/subprocess.py", line 438, 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 68, in <module>
    cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension},
  File "/opt/conda/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/opt/conda/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/opt/conda/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/opt/conda/lib/python3.6/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/opt/conda/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/opt/conda/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 78, in run
    _build_ext.run(self)
  File "/opt/conda/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
    _build_ext.build_ext.run(self)
  File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 603, in build_extensions
    build_ext.build_extensions(self)
  File "/opt/conda/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 194, in build_extensions
    self.build_extension(ext)
  File "/opt/conda/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 199, in build_extension
    _build_ext.build_extension(self, ext)
  File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
    depends=ext.depends)
  File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 437, in unix_wrap_ninja_compile
    with_cuda=with_cuda)
  File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1163, in _write_ninja_file_and_compile_objects
    error_prefix='Error compiling objects for extension')
  File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1436, in _run_ninja_build
    raise RuntimeError(message)
RuntimeError: Error compiling objects for extension
Scalsol commented 4 years ago

It seems that the problem is caused by the cuda version combined with your pytorch is not consistent with your nvcc version? I suggest you to check that first.

hyperparameters commented 4 years ago

thanx for your reply i was using pytorch==1.5 that caused the problem

works fine with pytorch==1.3.1 torchvision==0.4.2

joe660 commented 3 years ago

thanx for your reply i was using pytorch==1.5 that caused the problem

works fine with pytorch==1.3.1 torchvision==0.4.2

Have you succeeded in reproducing? Is your version of Python 3.6? thanks!

Sanku-Yogesh commented 2 years ago

thanx for your reply i was using pytorch==1.5 that caused the problem works fine with pytorch==1.3.1 torchvision==0.4.2

Have you succeeded in reproducing? Is your version of Python 3.6? thanks!

Have you figured it out? If yes, could u please respond to this chat.