Here's the revised GitHub issue including the error logs you provided:
Title:
π¨ [Bug] Windows - mamba-ssm installation fails with missing triton dependency and --no-build-isolation failure
Environment:
- OS: Windows 11 Pro
- Python version:
3.11.5
- CUDA version:
12.4
- PyTorch version:
2.5.1+cu121
- Torchvision version:
0.20.1+cu121
- Torchaudio version:
2.5.1+cu121
- Visual Studio: VS 2022 Community 14.39.33519
- CUDA Compiler (
nvcc): 12.4.131
- Conda Environment:
MasterThesis
Description of the Issue:
I am attempting to install mamba-ssm on a Windows machine with a correctly configured CUDA and PyTorch environment. However, the installation fails with a missing triton dependency and build errors, even when using the --no-build-isolation and --no-deps flags.
Steps to Reproduce:
- Create a fresh Conda environment:
conda create -n test_env python=3.11
conda activate test_env
- Confirm CUDA installation:
nvcc --version # CUDA 12.4 confirmed
- Install PyTorch with CUDA support:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
- Attempt to install
mamba-ssm using --no-build-isolation:
pip install mamba-ssm --no-build-isolation --no-deps
- Clone and install directly from GitHub:
git clone https://github.com/state-spaces/mamba.git
cd mamba
pip install . --no-build-isolation --no-deps
Observed Errors:
Error log during installation with --no-build-isolation:
Building wheels for collected packages: mamba-ssm
Building wheel for mamba-ssm (pyproject.toml) ... error
error: subprocess-exited-with-error
Γ Building wheel for mamba-ssm (pyproject.toml) did not run successfully.
β exit code: 1
β°β> [75 lines of output]
torch.__version__ = 2.5.1+cu121
running bdist_wheel
UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
Guessing wheel URL: https://github.com/state-spaces/mamba/releases/download/v2.2.4/mamba_ssm-2.2.4+cu12torch2.5cxx11abiFALSE-cp311-cp311-win_amd64.whl
Precompiled wheel not found. Building from source...
...
c1xx: fatal error C1083: Cannot open source file: 'csrc/selective_scan/selective_scan.cpp': No such file or directory
error: command 'cl.exe' failed with exit code 2
Key Issues Noted:
triton dependency could not be resolved.
- Source files (
csrc/selective_scan/selective_scan.cpp) missing in the build.
- The
--no-build-isolation flag does not prevent the error.
- Potential version mismatch:
The detected CUDA version (12.4) has a minor version mismatch with the version that was used to compile PyTorch (12.1).
Most likely this shouldn't be a problem.
What I've Tried:
- β
Confirmed CUDA installation and compatibility (
nvcc 12.4).
- β
Verified
torch and torch.cuda.is_available() return True.
- β
Installed
triton manually:
pip install triton
pip install triton==2.1.0
- β
Attempted installation from both PyPI and the GitHub repository.
- β
Upgraded
setuptools and wheel:
pip install --upgrade setuptools wheel
Expected Behavior:
pip install mamba-ssm should correctly build the package without missing source files.
- The
--no-build-isolation flag should prevent the CPU version of PyTorch from being reinstalled.
Possible Causes Identified:
- The
csrc directory may be missing or improperly referenced in the pyproject.toml.
triton might not be fully compatible with Windows or the latest CUDA version.
- The
--no-build-isolation flag might not be functioning correctly in the setuptools configuration.
Request for Assistance:
- Is the
mamba-ssm package officially supported for Windows?
- Should I consider downgrading CUDA or PyTorch for compatibility?
- Is there an alternative way to bypass the
triton dependency for a CPU-only installation?
System Information (pip freeze):
filelock==3.13.1
fsspec==2024.2.0
Jinja2==3.1.3
MarkupSafe==2.1.5
mpmath==1.3.0
networkx==3.2.1
numpy==2.2.1
pillow==10.2.0
sympy==1.13.1
torch==2.5.1+cu121
torchaudio==2.5.1+cu121
torchvision==0.20.1+cu121
typing_extensions==4.9.0
π Thank you for your time and assistance!
Please let me know if you need any additional information or test results.
Here's the revised GitHub issue including the error logs you provided:
Title:
π¨
[Bug] Windows - mamba-ssm installation fails with missing triton dependency and --no-build-isolation failureEnvironment:
3.11.512.42.5.1+cu1210.20.1+cu1212.5.1+cu121nvcc): 12.4.131MasterThesisDescription of the Issue:
I am attempting to install
mamba-ssmon a Windows machine with a correctly configured CUDA and PyTorch environment. However, the installation fails with a missingtritondependency and build errors, even when using the--no-build-isolationand--no-depsflags.Steps to Reproduce:
nvcc --version # CUDA 12.4 confirmedmamba-ssmusing--no-build-isolation:Observed Errors:
Error log during installation with
--no-build-isolation:Key Issues Noted:
tritondependency could not be resolved.csrc/selective_scan/selective_scan.cpp) missing in the build.--no-build-isolationflag does not prevent the error.What I've Tried:
nvcc 12.4).torchandtorch.cuda.is_available()returnTrue.tritonmanually:setuptoolsandwheel:Expected Behavior:
pip install mamba-ssmshould correctly build the package without missing source files.--no-build-isolationflag should prevent the CPU version of PyTorch from being reinstalled.Possible Causes Identified:
csrcdirectory may be missing or improperly referenced in thepyproject.toml.tritonmight not be fully compatible with Windows or the latest CUDA version.--no-build-isolationflag might not be functioning correctly in thesetuptoolsconfiguration.Request for Assistance:
mamba-ssmpackage officially supported for Windows?tritondependency for a CPU-only installation?System Information (
pip freeze):π Thank you for your time and assistance!
Please let me know if you need any additional information or test results.