mamba icon indicating copy to clipboard operation
mamba copied to clipboard

ImportError of causal_con1d with torch 2.2 upgrade

Open lukaemon opened this issue 1 year ago • 6 comments
trafficstars

Here is the trace.

Traceback (most recent call last):
  File "/home/lukaemon/Dev/lab/mamba/train.py", line 21, in <module>
    from mamba import MambaLM, MambaConfig
  File "/home/lukaemon/Dev/lab/mamba/mamba.py", line 11, in <module>
    from mamba_ssm import Mamba
  File "/home/lukaemon/miniconda3/envs/lab/lib/python3.11/site-packages/mamba_ssm/__init__.py", line 3, in <module>
    from mamba_ssm.ops.selective_scan_interface import selective_scan_fn, mamba_inner_fn
  File "/home/lukaemon/miniconda3/envs/lab/lib/python3.11/site-packages/mamba_ssm/ops/selective_scan_interface.py", line 9, in <module>
    from causal_conv1d import causal_conv1d_fn
  File "/home/lukaemon/miniconda3/envs/lab/lib/python3.11/site-packages/causal_conv1d/__init__.py", line 3, in <module>
    from causal_conv1d.causal_conv1d_interface import causal_conv1d_fn, causal_conv1d_update
  File "/home/lukaemon/miniconda3/envs/lab/lib/python3.11/site-packages/causal_conv1d/causal_conv1d_interface.py", line 7, in <module>
    import causal_conv1d_cuda
ImportError: /home/lukaemon/miniconda3/envs/lab/lib/python3.11/site-packages/causal_conv1d_cuda.cpython-311-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops10zeros_like4callERKNS_6TensorEN3c108optionalINS5_10ScalarTypeEEENS6_INS5_6LayoutEEENS6_INS5_6DeviceEEENS6_IbEENS6_INS5_12MemoryFormatEEE

Build conv1d from source doesn't work as well. No problem with torch 2.1. Did I miss something?

lukaemon avatar Jan 31 '24 16:01 lukaemon

I just pushed a version of causal-conv1d, can you try again?

tridao avatar Feb 01 '24 07:02 tridao

If that does not help try to install it with: CAUSAL_CONV1D_FORCE_BUILD=TRUE pip install https://github.com/Dao-AILab/causal-conv1d/archive/refs/tags/v1.1.2.tar.gz

ocg2347 avatar Feb 01 '24 14:02 ocg2347

Hi, same problem here, the causal_conv1d_force cannot work.

HelloWorldLTY avatar Feb 06 '24 01:02 HelloWorldLTY

Hi, I used CAUSAL_CONV1D_FORCE_BUILD=TRUE pip install causal_conv1d-1.1.3.post1+cu118torch2.0cxx11abiFALSE-cp310-cp310-linux_x86_64.whl and got the same error message here.

longw010 avatar Feb 08 '24 09:02 longw010

I m getting this error when installing:

  RuntimeError:
  The detected CUDA version (12.3) mismatches the version that was used to compile
  PyTorch (11.8). Please make sure to use the same CUDA versions.

  [end of output]

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

mohdil23 avatar Feb 20 '24 14:02 mohdil23

Installing from the Mamba repo, rather than pip install mamba fixed the issue with causal_conv1d for me.

pjsample avatar Feb 22 '24 16:02 pjsample

Had same issue with 2.2.1

What works for me was:

  1. git clone both repo: causal-conv1d and mamba.
  2. do pip install . for both repo.

lchu6 avatar Mar 01 '24 19:03 lchu6