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

Not able to run make.sh #10

Open
ashBabu opened this issue Jun 1, 2023 · 1 comment
Open

Not able to run make.sh #10

ashBabu opened this issue Jun 1, 2023 · 1 comment

Comments

@ashBabu
Copy link

ashBabu commented Jun 1, 2023

Following exactly as in here. I needed to run two additional steps

  • conda install -c "nvidia/label/cuda-11.7.0" cuda-toolkit
  • export FORCE_CUDA=1
    Then I ran sh make.sh but it produced the following error
No CUDA runtime is found, using CUDA_HOME='/home/ash/anaconda3/envs/vision/'
running build
running build_py
running build_ext
/home/ash/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
building 'MultiScaleDeformableAttention' extension
gcc -pthread -B /home/ash/anaconda3/envs/vision/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/ash/Ash/repo/MaskFreeVIS/mask2former/modeling/pixel_decoder/ops/src -I/home/ash/.local/lib/python3.8/site-packages/torch/include -I/home/ash/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/ash/.local/lib/python3.8/site-packages/torch/include/TH -I/home/ash/.local/lib/python3.8/site-packages/torch/include/THC -I/home/ash/anaconda3/envs/vision/include -I/home/ash/anaconda3/envs/vision/include/python3.8 -c /home/ash/Ash/repo/MaskFreeVIS/mask2former/modeling/pixel_decoder/ops/src/cpu/ms_deform_attn_cpu.cpp -o build/temp.linux-x86_64-cpython-38/home/ash/Ash/repo/MaskFreeVIS/mask2former/modeling/pixel_decoder/ops/src/cpu/ms_deform_attn_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=MultiScaleDeformableAttention -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
Traceback (most recent call last):
  File "setup.py", line 68, in <module>
    setup(
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
    super().run_command(command)
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 131, in run
    self.run_command(cmd_name)
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
    super().run_command(command)
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
    _build_ext.run(self)
  File "/home/ash/anaconda3/envs/vision/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
    _build_ext.build_ext.run(self)
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
    self.build_extensions()
  File "/home/ash/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 843, in build_extensions
    build_ext.build_extensions(self)
  File "/home/ash/anaconda3/envs/vision/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
    _build_ext.build_ext.build_extensions(self)
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
    self._build_extensions_serial()
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
    _build_ext.build_extension(self, ext)
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
    objects = self.compiler.compile(
  File "/home/ash/.local/lib/python3.8/site-packages/setuptools/_distutils/ccompiler.py", line 600, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/home/ash/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 581, in unix_wrap_single_compile
    cflags = unix_cuda_flags(cflags)
  File "/home/ash/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 548, in unix_cuda_flags
    cflags + _get_cuda_arch_flags(cflags))
  File "/home/ash/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1773, in _get_cuda_arch_flags
    arch_list[-1] += '+PTX'
IndexError: list index out of range

I cant find a way to fix it.

@lkeab
Copy link
Collaborator

lkeab commented Jun 22, 2023

Hi, this is mostly related to the cuda running environment.

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