Skip to content

Commit bed7e5d

Browse files
committed
Move prerequisite
1 parent 1e6aa5e commit bed7e5d

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,6 @@ Mamba is a new state space model architecture showing promising performance on i
1717
It is based on the line of progress on [structured state space models](https://github.com/state-spaces/s4),
1818
with an efficient hardware-aware design and implementation in the spirit of [FlashAttention](https://github.com/Dao-AILab/flash-attention).
1919

20-
## Prerequisites
21-
22-
### Patching ROCm
23-
24-
If you are on ROCm 6.0, run the following steps to avoid errors during compilation. This is not required for ROCm 6.1 onwards.
25-
26-
1. Locate your ROCm installation directory. This is typically found at `/opt/rocm/`, but may vary depending on your installation.
27-
28-
2. Apply the Patch. Run with `sudo` in case you encounter permission issues.
29-
```bash
30-
patch /opt/rocm/include/hip/amd_detail/amd_hip_bf16.h < rocm_patch/rocm6_0.patch
31-
```
32-
3320
## Installation
3421

3522
- [Option] `pip install causal-conv1d>=1.2.0`: an efficient implementation of a simple causal Conv1d layer used inside the Mamba block.
@@ -45,6 +32,8 @@ Other requirements:
4532
- PyTorch 1.12+
4633
- CUDA 11.6+
4734

35+
For AMD cards, see additional prerequisites below.
36+
4837
## Usage
4938

5039
We expose several levels of interface with the Mamba model.
@@ -217,6 +206,19 @@ However, some frameworks may have post-initialization hooks (e.g. setting all bi
217206
If this is the case, you may have to add custom logic (e.g. this [line](https://github.com/state-spaces/mamba/blob/f0affcf69f06d1d06cef018ff640bf080a11c421/mamba_ssm/modules/mamba_simple.py#L104) turns off re-initializing in our trainer, but would be a no-op in any other framework)
218207
that is specific to the training framework.
219208

209+
## Additional Prerequisites for AMD cards
210+
211+
### Patching ROCm
212+
213+
If you are on ROCm 6.0, run the following steps to avoid errors during compilation. This is not required for ROCm 6.1 onwards.
214+
215+
1. Locate your ROCm installation directory. This is typically found at `/opt/rocm/`, but may vary depending on your installation.
216+
217+
2. Apply the Patch. Run with `sudo` in case you encounter permission issues.
218+
```bash
219+
patch /opt/rocm/include/hip/amd_detail/amd_hip_bf16.h < rocm_patch/rocm6_0.patch
220+
```
221+
220222

221223
## Citation
222224

0 commit comments

Comments
 (0)