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

InstallationError: nvcc fatal : Unsupported gpu architecture 'compute_75' ninja: build stopped: subcommand failed. Error compiling objects for extension #15

Open
raoufkeskes opened this issue Jun 21, 2020 · 1 comment

Comments

@raoufkeskes
Copy link

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help. YES
  2. The bug has not been fixed in the latest version. YES

Describe the bug
raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /home/raouf/anaconda3/envs/open-mmlab/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/raouf/mmdetection/setup.py'"'"'; file='"'"'/home/raouf/mmdetection/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
Removed build tracker: '/tmp/pip-req-tracker-4weaq6b4'

Reproduction

  1. What command or script did you run? MMDETECTRON INSTALLATION
pip install -v -e .
  1. Did you make any modifications on the code or config? NO
    Did you understand what you have modified? .
  2. What dataset did you use?

Environment

  1. Please run python mmdet/utils/collect_env.py PROBLEM WITH MMDET INSTALLATION
  2. You may add addition that may be helpful for locating the problem, such as
    • How you installed PyTorch [e.g., pip, conda, source]
    • Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)

Error traceback
If applicable, paste the error trackback here.

Non-user install because site-packages writeable
Created temporary directory: /tmp/pip-ephem-wheel-cache-cyi012tq
Created temporary directory: /tmp/pip-req-tracker-4weaq6b4
Initialized build tracking at /tmp/pip-req-tracker-4weaq6b4
Created build tracker: /tmp/pip-req-tracker-4weaq6b4
Entered build tracker: /tmp/pip-req-tracker-4weaq6b4
Created temporary directory: /tmp/pip-install-bds8rzv2
Obtaining file:///home/raouf/mmdetection
  Added file:///home/raouf/mmdetection to build tracker '/tmp/pip-req-tracker-4weaq6b4'
    Running setup.py (path:/home/raouf/mmdetection/setup.py) egg_info for package from file:///home/raouf/mmdetection
    Created temporary directory: /tmp/pip-pip-egg-info-48w9rucq
    Running command python setup.py egg_info
    running egg_info
    creating /tmp/pip-pip-egg-info-48w9rucq/mmdet.egg-info
    writing /tmp/pip-pip-egg-info-48w9rucq/mmdet.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-48w9rucq/mmdet.egg-info/dependency_links.txt
    writing requirements to /tmp/pip-pip-egg-info-48w9rucq/mmdet.egg-info/requires.txt
    writing top-level names to /tmp/pip-pip-egg-info-48w9rucq/mmdet.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-48w9rucq/mmdet.egg-info/SOURCES.txt'
    reading manifest file '/tmp/pip-pip-egg-info-48w9rucq/mmdet.egg-info/SOURCES.txt'
    writing manifest file '/tmp/pip-pip-egg-info-48w9rucq/mmdet.egg-info/SOURCES.txt'
  Source in /home/raouf/mmdetection has version 2.1.0+0d67223, which satisfies requirement mmdet==2.1.0+0d67223 from file:///home/raouf/mmdetection
  Removed mmdet==2.1.0+0d67223 from file:///home/raouf/mmdetection from build tracker '/tmp/pip-req-tracker-4weaq6b4'
Requirement already satisfied: matplotlib in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from mmdet==2.1.0+0d67223) (3.2.2)
Requirement already satisfied: mmcv>=0.6.0 in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from mmdet==2.1.0+0d67223) (0.6.1)
Requirement already satisfied: numpy in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from mmdet==2.1.0+0d67223) (1.18.1)
Requirement already satisfied: Pillow<=6.2.2 in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from mmdet==2.1.0+0d67223) (6.2.2)
Requirement already satisfied: six in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from mmdet==2.1.0+0d67223) (1.15.0)
Requirement already satisfied: terminaltables in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from mmdet==2.1.0+0d67223) (3.1.0)
Requirement already satisfied: torch>=1.3 in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from mmdet==2.1.0+0d67223) (1.5.1)
Requirement already satisfied: torchvision in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from mmdet==2.1.0+0d67223) (0.6.0a0+35d732a)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from matplotlib->mmdet==2.1.0+0d67223) (1.2.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from matplotlib->mmdet==2.1.0+0d67223) (2.4.7)
Requirement already satisfied: python-dateutil>=2.1 in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from matplotlib->mmdet==2.1.0+0d67223) (2.8.1)
Requirement already satisfied: cycler>=0.10 in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from matplotlib->mmdet==2.1.0+0d67223) (0.10.0)
Requirement already satisfied: yapf in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from mmcv>=0.6.0->mmdet==2.1.0+0d67223) (0.30.0)
Requirement already satisfied: addict in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from mmcv>=0.6.0->mmdet==2.1.0+0d67223) (2.2.1)
Requirement already satisfied: pyyaml in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from mmcv>=0.6.0->mmdet==2.1.0+0d67223) (5.3.1)
Requirement already satisfied: opencv-python>=3 in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from mmcv>=0.6.0->mmdet==2.1.0+0d67223) (4.2.0.34)
Requirement already satisfied: future in /home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages (from torch>=1.3->mmdet==2.1.0+0d67223) (0.18.2)
Installing collected packages: mmdet
  Running setup.py develop for mmdet
    Running command /home/raouf/anaconda3/envs/open-mmlab/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/raouf/mmdetection/setup.py'"'"'; __file__='"'"'/home/raouf/mmdetection/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
    running develop
    running egg_info
    writing mmdet.egg-info/PKG-INFO
    writing dependency_links to mmdet.egg-info/dependency_links.txt
    writing requirements to mmdet.egg-info/requires.txt
    writing top-level names to mmdet.egg-info/top_level.txt
    reading manifest file 'mmdet.egg-info/SOURCES.txt'
    writing manifest file 'mmdet.egg-info/SOURCES.txt'
    running build_ext
    building 'mmdet.ops.nms.nms_ext' extension
    Emitting ninja build file /home/raouf/mmdetection/build/temp.linux-x86_64-3.7/build.ninja...
    Compiling objects...
    Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
    [1/1] /usr/bin/nvcc -DWITH_CUDA -I/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include -I/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/TH -I/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/THC -I/home/raouf/anaconda3/envs/open-mmlab/include/python3.7m -c -c /home/raouf/mmdetection/mmdet/ops/nms/src/cuda/nms_kernel.cu -o /home/raouf/mmdetection/build/temp.linux-x86_64-3.7/mmdet/ops/nms/src/cuda/nms_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_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 -DTORCH_EXTENSION_NAME=nms_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
    FAILED: /home/raouf/mmdetection/build/temp.linux-x86_64-3.7/mmdet/ops/nms/src/cuda/nms_kernel.o
    /usr/bin/nvcc -DWITH_CUDA -I/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include -I/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/TH -I/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/include/THC -I/home/raouf/anaconda3/envs/open-mmlab/include/python3.7m -c -c /home/raouf/mmdetection/mmdet/ops/nms/src/cuda/nms_kernel.cu -o /home/raouf/mmdetection/build/temp.linux-x86_64-3.7/mmdet/ops/nms/src/cuda/nms_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_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 -DTORCH_EXTENSION_NAME=nms_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
    nvcc fatal   : Unsupported gpu architecture 'compute_75'
    ninja: build stopped: subcommand failed.
    Traceback (most recent call last):
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1423, in _run_ninja_build
        check=True)
      File "/home/raouf/anaconda3/envs/open-mmlab/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 "<string>", line 1, in <module>
      File "/home/raouf/mmdetection/setup.py", line 304, in <module>
        zip_safe=False)
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/setuptools/__init__.py", line 161, in setup
        return distutils.core.setup(**attrs)
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/setuptools/command/develop.py", line 38, in run
        self.install_for_development()
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/setuptools/command/develop.py", line 140, in install_for_development
        self.run_command('build_ext')
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 87, in run
        _build_ext.run(self)
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
        _build_ext.build_ext.run(self)
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/distutils/command/build_ext.py", line 340, in run
        self.build_extensions()
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 603, in build_extensions
        build_ext.build_extensions(self)
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
        _build_ext.build_ext.build_extensions(self)
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
        self._build_extensions_serial()
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
        self.build_extension(ext)
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 208, in build_extension
        _build_ext.build_extension(self, ext)
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension
        depends=ext.depends)
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 437, in unix_wrap_ninja_compile
        with_cuda=with_cuda)
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1163, in _write_ninja_file_and_compile_objects
        error_prefix='Error compiling objects for extension')
      File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1436, in _run_ninja_build
        raise RuntimeError(message)
    RuntimeError: Error compiling objects for extension
ERROR: Command errored out with exit status 1: /home/raouf/anaconda3/envs/open-mmlab/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/raouf/mmdetection/setup.py'"'"'; __file__='"'"'/home/raouf/mmdetection/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
Exception information:
Traceback (most recent call last):
  File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 188, in _main
    status = self.run(options, args)
  File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 185, in wrapper
    return func(self, options, args)
  File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 407, in run
    use_user_site=options.use_user_site,
  File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/pip/_internal/req/__init__.py", line 71, in install_given_reqs
    **kwargs
  File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 790, in install
    unpacked_source_directory=self.unpacked_source_directory,
  File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/pip/_internal/operations/install/editable_legacy.py", line 51, in install_editable
    cwd=unpacked_source_directory,
  File "/home/raouf/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 241, in call_subprocess
    raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /home/raouf/anaconda3/envs/open-mmlab/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/raouf/mmdetection/setup.py'"'"'; __file__='"'"'/home/raouf/mmdetection/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
Removed build tracker: '/tmp/pip-req-tracker-4weaq6b4'

Bug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

@songguanglu
Copy link
Collaborator

Hi, 'nvcc fatal : Unsupported gpu architecture 'compute_75'' seems that your cuda version not supports four your GPU. You can use a higher version of cuda such as cuda 10.x.

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