AmeenAli / HiddenMambaAttn

Official PyTorch Implementation of "The Hidden Attention of Mamba Models"
204 stars 12 forks source link

Cannot install from source #16

Open chokevin8 opened 3 months ago

chokevin8 commented 3 months ago

Hello, I've been trying to setup the environment via instructions on README, but I am not able to do the last part of installing both causal-conv1d and mamba-1p1p1 from source.

Could you maybe make sure that this installation still works now? I've been using the correct versions (python 3.10.13, torch 2.1.1, CUDA 11.8) on Ubuntu, and have no problems with CUDA (other projects in this same server work with no problem). I've tried this more than five times on a clean, new environment but with no success. Would really appreciate some guidance from any of you guys, thank you! @AmeenAli @Itamarzimm @ItamarZimerman @erjanmx @bhoov

Below is the full error message:

`(mamba_attn) wjcho@hq-ailab-ai1-gpu4:~/HiddenMambaAttn/causal-conv1d$ pip install --editable . Obtaining file:///home/wjcho/HiddenMambaAttn/causal-conv1d Preparing metadata (setup.py) ... done Requirement already satisfied: torch in /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages (from causal_conv1d==1.0.0) (2.1.1+cu118) Requirement already satisfied: packaging in /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages (from causal_conv1d==1.0.0) (23.2) Requirement already satisfied: ninja in /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages (from causal_conv1d==1.0.0) (1.11.1.1) Requirement already satisfied: filelock in /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages (from torch->causal_conv1d==1.0.0) (3.13.1) Requirement already satisfied: typing-extensions in /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages (from torch->causal_conv1d==1.0.0) (4.8.0) Requirement already satisfied: sympy in /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages (from torch->causal_conv1d==1.0.0) (1.12) Requirement already satisfied: networkx in /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages (from torch->causal_conv1d==1.0.0) (3.2.1) Requirement already satisfied: jinja2 in /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages (from torch->causal_conv1d==1.0.0) (3.1.2) Requirement already satisfied: fsspec in /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages (from torch->causal_conv1d==1.0.0) (2023.10.0) Requirement already satisfied: triton==2.1.0 in /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages (from torch->causal_conv1d==1.0.0) (2.1.0) Requirement already satisfied: MarkupSafe>=2.0 in /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages (from jinja2->torch->causal_conv1d==1.0.0) (2.1.3) Requirement already satisfied: mpmath>=0.19 in /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages (from sympy->torch->causal_conv1d==1.0.0) (1.3.0) Installing collected packages: causal_conv1d DEPRECATION: Legacy editable install of causal_conv1d==1.0.0 from file:///home/wjcho/HiddenMambaAttn/causal-conv1d (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457 Running setup.py develop for causal_conv1d error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [145 lines of output]

    torch.__version__  = 2.1.1+cu118

    running develop
    /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/command/develop.py:42: EasyInstallDeprecationWarning: easy_install command is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` and ``easy_install``.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://github.com/pypa/setuptools/issues/917 for details.
            ********************************************************************************

    !!
      easy_install.initialize_options(self)
    /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` directly.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
            ********************************************************************************

    !!
      self.initialize_options()
    running egg_info
    writing causal_conv1d.egg-info/PKG-INFO
    writing dependency_links to causal_conv1d.egg-info/dependency_links.txt
    writing requirements to causal_conv1d.egg-info/requires.txt
    writing top-level names to causal_conv1d.egg-info/top_level.txt
    reading manifest file 'causal_conv1d.egg-info/SOURCES.txt'
    adding license file 'LICENSE'
    adding license file 'AUTHORS'
    writing manifest file 'causal_conv1d.egg-info/SOURCES.txt'
    running build_ext
    /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/utils/cpp_extension.py:424: 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 'causal_conv1d_cuda' extension
    Emitting ninja build file /home/wjcho/HiddenMambaAttn/causal-conv1d/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/4] c++ -MMD -MF /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d.o.d -pthread -B /home/wjcho/.conda/envs/mamba_attn/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/wjcho/.conda/envs/mamba_attn/include -fPIC -O2 -isystem /home/wjcho/.conda/envs/mamba_attn/include -fPIC -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d.cpp -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
    FAILED: /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d.o
    c++ -MMD -MF /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d.o.d -pthread -B /home/wjcho/.conda/envs/mamba_attn/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/wjcho/.conda/envs/mamba_attn/include -fPIC -O2 -isystem /home/wjcho/.conda/envs/mamba_attn/include -fPIC -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d.cpp -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
    In file included from /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d.cpp:5:
    /home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:10: fatal error: cuda_runtime_api.h: No such file or directory
        5 | #include <cuda_runtime_api.h>
          |          ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    [2/4] /home/wjcho/.conda/envs/mamba_attn/bin/nvcc  -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d_fwd.cu -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_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 -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=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
    FAILED: /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_fwd.o
    /home/wjcho/.conda/envs/mamba_attn/bin/nvcc  -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d_fwd.cu -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_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 -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=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
    <command-line>: fatal error: cuda_runtime.h: No such file or directory
    compilation terminated.
    <command-line>: fatal error: cuda_runtime.h: No such file or directory
    compilation terminated.
    <command-line>: fatal error: cuda_runtime.h: No such file or directory
    compilation terminated.
    <command-line>: fatal error: cuda_runtime.h: No such file or directory
    compilation terminated.
    [3/4] /home/wjcho/.conda/envs/mamba_attn/bin/nvcc  -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d_bwd.cu -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_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 -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=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
    FAILED: /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_bwd.o
    /home/wjcho/.conda/envs/mamba_attn/bin/nvcc  -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d_bwd.cu -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_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 -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=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
    <command-line>: fatal error: cuda_runtime.h: No such file or directory
    compilation terminated.
    <command-line>: fatal error: cuda_runtime.h: No such file or directory
    compilation terminated.
    <command-line>: fatal error: cuda_runtime.h: No such file or directory
    compilation terminated.
    <command-line>: fatal error: cuda_runtime.h: No such file or directory
    compilation terminated.
    [4/4] /home/wjcho/.conda/envs/mamba_attn/bin/nvcc  -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d_update.cu -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_update.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 -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=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
    FAILED: /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_update.o
    /home/wjcho/.conda/envs/mamba_attn/bin/nvcc  -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d_update.cu -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_update.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 -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=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
    <command-line>: fatal error: cuda_runtime.h: No such file or directory
    compilation terminated.
    <command-line>: fatal error: cuda_runtime.h: No such file or directory
    compilation terminated.
    <command-line>: fatal error: cuda_runtime.h: No such file or directory
    compilation terminated.
    ninja: build stopped: subcommand failed.
    Traceback (most recent call last):
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2100, in _run_ninja_build
        subprocess.run(
      File "/home/wjcho/.conda/envs/mamba_attn/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 "/home/wjcho/HiddenMambaAttn/causal-conv1d/setup.py", line 226, in <module>
        setup(
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
        return distutils.core.setup(**attrs)
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
        return run_commands(dist)
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
        dist.run_commands()
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
        self.run_command(cmd)
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
        super().run_command(command)
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
        cmd_obj.run()
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/command/develop.py", line 36, in run
        self.install_for_development()
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/command/develop.py", line 113, in install_for_development
        self.run_command('build_ext')
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
        self.distribution.run_command(command)
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
        super().run_command(command)
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
        cmd_obj.run()
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 93, in run
        _build_ext.run(self)
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
        self.build_extensions()
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 873, in build_extensions
        build_ext.build_extensions(self)
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 479, in build_extensions
        self._build_extensions_serial()
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 505, in _build_extensions_serial
        self.build_extension(ext)
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 254, in build_extension
        _build_ext.build_extension(self, ext)
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 560, in build_extension
        objects = self.compiler.compile(
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 686, in unix_wrap_ninja_compile
        _write_ninja_file_and_compile_objects(
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1774, in _write_ninja_file_and_compile_objects
        _run_ninja_build(
      File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2116, 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: subprocess-exited-with-error

× python setup.py develop did not run successfully. │ exit code: 1 ╰─> [145 lines of output]

torch.__version__  = 2.1.1+cu118

running develop
/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/command/develop.py:42: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
running egg_info
writing causal_conv1d.egg-info/PKG-INFO
writing dependency_links to causal_conv1d.egg-info/dependency_links.txt
writing requirements to causal_conv1d.egg-info/requires.txt
writing top-level names to causal_conv1d.egg-info/top_level.txt
reading manifest file 'causal_conv1d.egg-info/SOURCES.txt'
adding license file 'LICENSE'
adding license file 'AUTHORS'
writing manifest file 'causal_conv1d.egg-info/SOURCES.txt'
running build_ext
/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/utils/cpp_extension.py:424: 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 'causal_conv1d_cuda' extension
Emitting ninja build file /home/wjcho/HiddenMambaAttn/causal-conv1d/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/4] c++ -MMD -MF /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d.o.d -pthread -B /home/wjcho/.conda/envs/mamba_attn/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/wjcho/.conda/envs/mamba_attn/include -fPIC -O2 -isystem /home/wjcho/.conda/envs/mamba_attn/include -fPIC -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d.cpp -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
FAILED: /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d.o
c++ -MMD -MF /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d.o.d -pthread -B /home/wjcho/.conda/envs/mamba_attn/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/wjcho/.conda/envs/mamba_attn/include -fPIC -O2 -isystem /home/wjcho/.conda/envs/mamba_attn/include -fPIC -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d.cpp -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
In file included from /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d.cpp:5:
/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:10: fatal error: cuda_runtime_api.h: No such file or directory
    5 | #include <cuda_runtime_api.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
[2/4] /home/wjcho/.conda/envs/mamba_attn/bin/nvcc  -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d_fwd.cu -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_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 -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=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
FAILED: /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_fwd.o
/home/wjcho/.conda/envs/mamba_attn/bin/nvcc  -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d_fwd.cu -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_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 -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=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
<command-line>: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
<command-line>: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
<command-line>: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
<command-line>: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
[3/4] /home/wjcho/.conda/envs/mamba_attn/bin/nvcc  -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d_bwd.cu -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_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 -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=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
FAILED: /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_bwd.o
/home/wjcho/.conda/envs/mamba_attn/bin/nvcc  -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d_bwd.cu -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_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 -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=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
<command-line>: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
<command-line>: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
<command-line>: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
<command-line>: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
[4/4] /home/wjcho/.conda/envs/mamba_attn/bin/nvcc  -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d_update.cu -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_update.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 -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=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
FAILED: /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_update.o
/home/wjcho/.conda/envs/mamba_attn/bin/nvcc  -I/home/wjcho/HiddenMambaAttn/causal-conv1d -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/TH -I/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/include/THC -I/home/wjcho/.conda/envs/mamba_attn/include -I/home/wjcho/.conda/envs/mamba_attn/include/python3.10 -c -c /home/wjcho/HiddenMambaAttn/causal-conv1d/csrc/causal_conv1d_update.cu -o /home/wjcho/HiddenMambaAttn/causal-conv1d/build/temp.linux-x86_64-cpython-310/csrc/causal_conv1d_update.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 -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=causal_conv1d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
<command-line>: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
<command-line>: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
<command-line>: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2100, in _run_ninja_build
    subprocess.run(
  File "/home/wjcho/.conda/envs/mamba_attn/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 "/home/wjcho/HiddenMambaAttn/causal-conv1d/setup.py", line 226, in <module>
    setup(
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
    return distutils.core.setup(**attrs)
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
    return run_commands(dist)
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
    dist.run_commands()
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
    self.run_command(cmd)
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
    super().run_command(command)
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
    cmd_obj.run()
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/command/develop.py", line 36, in run
    self.install_for_development()
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/command/develop.py", line 113, in install_for_development
    self.run_command('build_ext')
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
    super().run_command(command)
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
    cmd_obj.run()
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 93, in run
    _build_ext.run(self)
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
    self.build_extensions()
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 873, in build_extensions
    build_ext.build_extensions(self)
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 479, in build_extensions
    self._build_extensions_serial()
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 505, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 254, in build_extension
    _build_ext.build_extension(self, ext)
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 560, in build_extension
    objects = self.compiler.compile(
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 686, in unix_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1774, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "/home/wjcho/.conda/envs/mamba_attn/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2116, 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.`

chokevin8 commented 3 months ago

Not sure if this comment is a scam link, I'm not clicking that to make sure. Is this a bot? Also unclear about what you mean by "need to place a check in install to path and select "gcc.""?

chokevin8 commented 1 month ago

@AmeenAli @Itamarzimm @bhoov @erjanmx Any updates....?

yihsin9111 commented 1 month ago

Same problem :'(