MzeroMiko / VMamba

VMamba: Visual State Space Models,code is based on mamba
MIT License
2.07k stars 124 forks source link

Cannot install selective scan #174

Open MarioPaps opened 5 months ago

MarioPaps commented 5 months ago

Hello,

I'm trying to run this project on a cluster machine and the selective scan installation fails.

This is the error message:

`Building wheels for collected packages: selective_scan Building wheel for selective_scan (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [118 lines of output] No CUDA runtime is found, using CUDA_HOME='/rds/general/user/kp4718/home/anaconda3/envs/momba'

  torch.__version__  = 2.2.1+cu118

  CUDA_HOME = /rds/general/user/kp4718/home/anaconda3/envs/momba

  CUDA version:  11.8
  running bdist_wheel
  running build
  running build_ext
  /rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/utils/cpp_extension.py:425: UserWarning: There are no g++ version bounds defined for CUDA version 11.8
    warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
  building 'selective_scan_cuda_core' extension
  Emitting ninja build file /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/build.ninja...
  Compiling objects...
  Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
  [1/3] c++ -MMD -MF /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan.o.d -pthread -B /rds/general/user/kp4718/home/anaconda3/envs/momba/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /rds/general/user/kp4718/home/anaconda3/envs/momba/include -fPIC -O2 -isystem /rds/general/user/kp4718/home/anaconda3/envs/momba/include -fPIC -I/rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/TH -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/THC -I/rds/general/user/kp4718/home/anaconda3/envs/momba/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/include/python3.10 -c -c /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan/cus/selective_scan.cpp -o /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan.o -O3 -std=c++17 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=selective_scan_cuda_core -D_GLIBCXX_USE_CXX11_ABI=0
  FAILED: /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan.o
  c++ -MMD -MF /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan.o.d -pthread -B /rds/general/user/kp4718/home/anaconda3/envs/momba/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /rds/general/user/kp4718/home/anaconda3/envs/momba/include -fPIC -O2 -isystem /rds/general/user/kp4718/home/anaconda3/envs/momba/include -fPIC -I/rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/TH -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/THC -I/rds/general/user/kp4718/home/anaconda3/envs/momba/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/include/python3.10 -c -c /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan/cus/selective_scan.cpp -o /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan.o -O3 -std=c++17 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=selective_scan_cuda_core -D_GLIBCXX_USE_CXX11_ABI=0
  In file included from /rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/ATen/cuda/CUDAContext.h:3,
                   from /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan/cus/selective_scan.cpp:5:
  /rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/ATen/cuda/CUDAContextLight.h:6:10: fatal error: cuda_runtime_api.h: No such file or directory
   #include <cuda_runtime_api.h>
            ^~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  [2/3] /rds/general/user/kp4718/home/anaconda3/envs/momba/bin/nvcc --generate-dependencies-with-compile --dependency-output /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan_core_fwd.o.d -I/rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/TH -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/THC -I/rds/general/user/kp4718/home/anaconda3/envs/momba/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/include/python3.10 -c -c /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan/cus/selective_scan_core_fwd.cu -o /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan_core_fwd.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'"'"'' -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_NO_BFLOAT162_CONVERSIONS__ --expt-relaxed-constexpr --expt-extended-lambda --use_fast_math --ptxas-options=-v -lineinfo -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_90,code=sm_90 --threads 4 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=selective_scan_cuda_core -D_GLIBCXX_USE_CXX11_ABI=0
  FAILED: /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan_core_fwd.o
  /rds/general/user/kp4718/home/anaconda3/envs/momba/bin/nvcc --generate-dependencies-with-compile --dependency-output /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan_core_fwd.o.d -I/rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/TH -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/THC -I/rds/general/user/kp4718/home/anaconda3/envs/momba/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/include/python3.10 -c -c /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan/cus/selective_scan_core_fwd.cu -o /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan_core_fwd.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'"'"'' -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_NO_BFLOAT162_CONVERSIONS__ --expt-relaxed-constexpr --expt-extended-lambda --use_fast_math --ptxas-options=-v -lineinfo -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_90,code=sm_90 --threads 4 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=selective_scan_cuda_core -D_GLIBCXX_USE_CXX11_ABI=0
  cc1plus: fatal error: cuda_runtime.h: No such file or directory
  compilation terminated.
  cc1plus: fatal error: cuda_runtime.h: No such file or directory
  compilation terminated.
  cc1plus: fatal error: cuda_runtime.h: No such file or directory
  compilation terminated.
  cc1plus: fatal error: cuda_runtime.h: No such file or directory
  compilation terminated.
  fatal   : Could not open input file /rds/general/ephemeral/user/kp4718/ephemeral//tmpxft_001b6057_00000000-9_selective_scan_core_fwd.compute_70.cpp1.ii
  [3/3] /rds/general/user/kp4718/home/anaconda3/envs/momba/bin/nvcc --generate-dependencies-with-compile --dependency-output /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan_core_bwd.o.d -I/rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/TH -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/THC -I/rds/general/user/kp4718/home/anaconda3/envs/momba/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/include/python3.10 -c -c /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan/cus/selective_scan_core_bwd.cu -o /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan_core_bwd.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'"'"'' -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_NO_BFLOAT162_CONVERSIONS__ --expt-relaxed-constexpr --expt-extended-lambda --use_fast_math --ptxas-options=-v -lineinfo -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_90,code=sm_90 --threads 4 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=selective_scan_cuda_core -D_GLIBCXX_USE_CXX11_ABI=0
  FAILED: /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan_core_bwd.o
  /rds/general/user/kp4718/home/anaconda3/envs/momba/bin/nvcc --generate-dependencies-with-compile --dependency-output /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan_core_bwd.o.d -I/rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/TH -I/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/include/THC -I/rds/general/user/kp4718/home/anaconda3/envs/momba/include -I/rds/general/user/kp4718/home/anaconda3/envs/momba/include/python3.10 -c -c /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/csrc/selective_scan/cus/selective_scan_core_bwd.cu -o /rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cus/selective_scan_core_bwd.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'"'"'' -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_NO_BFLOAT162_CONVERSIONS__ --expt-relaxed-constexpr --expt-extended-lambda --use_fast_math --ptxas-options=-v -lineinfo -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_90,code=sm_90 --threads 4 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=selective_scan_cuda_core -D_GLIBCXX_USE_CXX11_ABI=0
  cc1plus: fatal error: cuda_runtime.h: No such file or directory
  compilation terminated.
  cc1plus: fatal error: cuda_runtime.h: No such file or directory
  compilation terminated.
  cc1plus: fatal error: cuda_runtime.h: No such file or directory
  compilation terminated.
  cc1plus: fatal error: cuda_runtime.h: No such file or directory
  compilation terminated.
  fatal   : Could not open input file /rds/general/ephemeral/user/kp4718/ephemeral//tmpxft_001b6056_00000000-9_selective_scan_core_bwd.compute_70.cpp1.ii
  ninja: build stopped: subcommand failed.
  Traceback (most recent call last):
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2096, in _run_ninja_build
      subprocess.run(
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/subprocess.py", line 526, 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 "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/rds/general/user/kp4718/home/code/VMamba/kernels/selective_scan/setup.py", line 142, in <module>
      setup(
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/__init__.py", line 104, in setup
      return distutils.core.setup(**attrs)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 368, in run
      self.run_command("build")
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
      self.run_command(cmd_name)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 91, in run
      _build_ext.run(self)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
      self.build_extensions()
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 871, in build_extensions
      build_ext.build_extensions(self)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 479, in build_extensions
      self._build_extensions_serial()
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 505, in _build_extensions_serial
      self.build_extension(ext)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 252, in build_extension
      _build_ext.build_extension(self, ext)
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 560, in build_extension
      objects = self.compiler.compile(
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 684, in unix_wrap_ninja_compile
      _write_ninja_file_and_compile_objects(
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1774, in _write_ninja_file_and_compile_objects
      _run_ninja_build(
    File "/rds/general/user/kp4718/home/anaconda3/envs/momba/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2112, in _run_ninja_build
      raise RuntimeError(message) from e
  RuntimeError: Error compiling objects for extension
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for selective_scan Running setup.py clean for selective_scan Failed to build selective_scan ERROR: Could not build wheels for selective_scan, which is required to install pyproject.toml-based projects`

Mehrdad-Noori commented 5 months ago

I had the same problem and used the following steps to fix it (versions are important):

git clone https://github.com/MzeroMiko/VMamba.git
cd VMamba

conda create -n vmamba python==3.8
conda activate vmamba
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia

my requirements.txt includes: packaging triton timm==0.4.12 pytest chardet yacs termcolor submitit tensorboardX fvcore seaborn

pip install -r requirements.txt
cd kernels/selective_scan && pip install .
MarioPaps commented 5 months ago

I tried this approach, with some modifications required for an HPC cluster, but I got the same error message. I am attaching my yaml file in txt form to provide more detail. Did this approach work for you specifically on an HPC platform?

vmamba_environment.txt

batman47steam commented 3 months ago

I had the same problem and used the following steps to fix it (versions are important):

git clone https://github.com/MzeroMiko/VMamba.git
cd VMamba

conda create -n vmamba python==3.8
conda activate vmamba
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia

my requirements.txt includes: packaging triton timm==0.4.12 pytest chardet yacs termcolor submitit tensorboardX fvcore seaborn

pip install -r requirements.txt
cd kernels/selective_scan && pip install .

Awesome! works fine for me