Closed chira98 closed 2 months ago
can you downgrade your numpy into 1.x?
@MzeroMiko Thank you for the response, still got the following issue
Processing /userhomes/17/CD/VMamba/kernels/selective_scan
Preparing metadata (setup.py) ... done
Requirement already satisfied: torch in /userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages (from selective_scan==0.0.2) (2.2.1)
Requirement already satisfied: packaging in /userhomes/17/.local/lib/python3.10/site-packages (from selective_scan==0.0.2) (24.1)
Requirement already satisfied: ninja in /userhomes/17/.local/lib/python3.10/site-packages (from selective_scan==0.0.2) (1.11.1.1)
Requirement already satisfied: einops in /userhomes/17/.local/lib/python3.10/site-packages (from selective_scan==0.0.2) (0.8.0)
Requirement already satisfied: filelock in /userhomes/17/.local/lib/python3.10/site-packages (from torch->selective_scan==0.0.2) (3.16.0)
Requirement already satisfied: typing-extensions>=4.8.0 in /userhomes/17/.local/lib/python3.10/site-packages (from torch->selective_scan==0.0.2) (4.12.2)
Requirement already satisfied: sympy in /userhomes/17/.local/lib/python3.10/site-packages (from torch->selective_scan==0.0.2) (1.13.2)
Requirement already satisfied: networkx in /userhomes/17/.local/lib/python3.10/site-packages (from torch->selective_scan==0.0.2) (3.3)
Requirement already satisfied: jinja2 in /userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages (from torch->selective_scan==0.0.2) (3.1.4)
Requirement already satisfied: fsspec in /userhomes/17/.local/lib/python3.10/site-packages (from torch->selective_scan==0.0.2) (2024.9.0)
Requirement already satisfied: MarkupSafe>=2.0 in /userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages (from jinja2->torch->selective_scan==0.0.2) (2.1.3)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /userhomes/17/.local/lib/python3.10/site-packages (from sympy->torch->selective_scan==0.0.2) (1.3.0)
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
╰─> [106 lines of output]
torch.__version__ = 2.2.1
CUDA_HOME = /userhomes/17/anaconda3/envs/vmamba_env
CUDA version: 12.1
running bdist_wheel
running build
running build_ext
/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/utils/cpp_extension.py:425: UserWarning: There are no g++ version bounds defined for CUDA version 12.1
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'selective_scan_cuda_oflex' extension
creating /userhomes/17/CD/VMamba/kernels/selective_scan/build
creating /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310
creating /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc
creating /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan
creating /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex
Emitting ninja build file /userhomes/17/CD/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] /userhomes/17/anaconda3/envs/vmamba_env/bin/nvcc --generate-dependencies-with-compile --dependency-output /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex/selective_scan_core_fwd.o.d -I/userhomes/17/CD/VMamba/kernels/selective_scan/csrc/selective_scan -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/TH -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/THC -I/userhomes/17/anaconda3/envs/vmamba_env/include -I/userhomes/17/anaconda3/envs/vmamba_env/include/python3.10 -c -c /userhomes/17/CD/VMamba/kernels/selective_scan/csrc/selective_scan/cusoflex/selective_scan_core_fwd.cu -o /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex/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_oflex -D_GLIBCXX_USE_CXX11_ABI=0 -ccbin gcc
FAILED: /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex/selective_scan_core_fwd.o
/userhomes/17/anaconda3/envs/vmamba_env/bin/nvcc --generate-dependencies-with-compile --dependency-output /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex/selective_scan_core_fwd.o.d -I/userhomes/17/CD/VMamba/kernels/selective_scan/csrc/selective_scan -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/TH -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/THC -I/userhomes/17/anaconda3/envs/vmamba_env/include -I/userhomes/17/anaconda3/envs/vmamba_env/include/python3.10 -c -c /userhomes/17/CD/VMamba/kernels/selective_scan/csrc/selective_scan/cusoflex/selective_scan_core_fwd.cu -o /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex/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_oflex -D_GLIBCXX_USE_CXX11_ABI=0 -ccbin gcc
/usr/include/cub/detail/device_synchronize.cuh(53): error: identifier "__cudaDeviceSynchronizeDeprecationAvoidance" is undefined
result = __cudaDeviceSynchronizeDeprecationAvoidance();
^
1 error detected in the compilation of "/userhomes/17/CD/VMamba/kernels/selective_scan/csrc/selective_scan/cusoflex/selective_scan_core_fwd.cu".
[2/3] /userhomes/17/anaconda3/envs/vmamba_env/bin/nvcc --generate-dependencies-with-compile --dependency-output /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex/selective_scan_core_bwd.o.d -I/userhomes/17/CD/VMamba/kernels/selective_scan/csrc/selective_scan -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/TH -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/THC -I/userhomes/17/anaconda3/envs/vmamba_env/include -I/userhomes/17/anaconda3/envs/vmamba_env/include/python3.10 -c -c /userhomes/17/CD/VMamba/kernels/selective_scan/csrc/selective_scan/cusoflex/selective_scan_core_bwd.cu -o /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex/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_oflex -D_GLIBCXX_USE_CXX11_ABI=0 -ccbin gcc
FAILED: /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex/selective_scan_core_bwd.o
/userhomes/17/anaconda3/envs/vmamba_env/bin/nvcc --generate-dependencies-with-compile --dependency-output /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex/selective_scan_core_bwd.o.d -I/userhomes/17/CD/VMamba/kernels/selective_scan/csrc/selective_scan -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/TH -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/THC -I/userhomes/17/anaconda3/envs/vmamba_env/include -I/userhomes/17/anaconda3/envs/vmamba_env/include/python3.10 -c -c /userhomes/17/CD/VMamba/kernels/selective_scan/csrc/selective_scan/cusoflex/selective_scan_core_bwd.cu -o /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex/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_oflex -D_GLIBCXX_USE_CXX11_ABI=0 -ccbin gcc
/usr/include/cub/detail/device_synchronize.cuh(53): error: identifier "__cudaDeviceSynchronizeDeprecationAvoidance" is undefined
result = __cudaDeviceSynchronizeDeprecationAvoidance();
^
1 error detected in the compilation of "/userhomes/17/CD/VMamba/kernels/selective_scan/csrc/selective_scan/cusoflex/selective_scan_core_bwd.cu".
[3/3] g++ -MMD -MF /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex/selective_scan_oflex.o.d -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /userhomes/17/anaconda3/envs/vmamba_env/include -fPIC -O2 -isystem /userhomes/17/anaconda3/envs/vmamba_env/include -fPIC -I/userhomes/17/CD/VMamba/kernels/selective_scan/csrc/selective_scan -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/TH -I/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/include/THC -I/userhomes/17/anaconda3/envs/vmamba_env/include -I/userhomes/17/anaconda3/envs/vmamba_env/include/python3.10 -c -c /userhomes/17/CD/VMamba/kernels/selective_scan/csrc/selective_scan/cusoflex/selective_scan_oflex.cpp -o /userhomes/17/CD/VMamba/kernels/selective_scan/build/temp.linux-x86_64-cpython-310/csrc/selective_scan/cusoflex/selective_scan_oflex.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_oflex -D_GLIBCXX_USE_CXX11_ABI=0
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2096, in _run_ninja_build
subprocess.run(
File "/userhomes/17/anaconda3/envs/vmamba_env/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 "/userhomes/17/CD/VMamba/kernels/selective_scan/setup.py", line 143, in <module>
setup(
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
self.run_command(cmd)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/wheel/_bdist_wheel.py", line 378, in run
self.run_command("build")
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 98, in run
_build_ext.run(self)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 871, in build_extensions
build_ext.build_extensions(self)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
self._build_extensions_serial()
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
self.build_extension(ext)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 263, in build_extension
_build_ext.build_extension(self, ext)
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 557, in build_extension
objects = self.compiler.compile(
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 684, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/userhomes/17/anaconda3/envs/vmamba_env/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1774, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/userhomes/17/anaconda3/envs/vmamba_env/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
I found similar issues and solutions, but none of them worked for me. I use following versions, Cuda=12.1 python= 3.10.13 pytorch=2.2.1 torchvision=0.17.1 torchaudio=2.2.1
Please help on how to resolve this issue. Thank you!