Skip to content

Commit 0625e8c

Browse files
Add kernel building instructions into readme
1 parent ed64ff2 commit 0625e8c

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,28 @@ cd RSR-Core
3535
pip install -e .
3636
```
3737

38+
#### Building the kernels
39+
40+
**CPU kernels** — Compile the C shared libraries via the provided Makefiles.
41+
Requires `gcc` with AVX2 and OpenMP support.
42+
43+
```bash
44+
make -C kernels/bit_1/cpu
45+
make -C kernels/bit_1_58/cpu
46+
```
47+
48+
**CUDA kernels** — No manual build step needed. CUDA kernels are JIT-compiled
49+
by PyTorch on first use (`torch.utils.cpp_extension`). Requirements:
50+
- CUDA toolkit (matching your PyTorch build)
51+
- `ninja` (`pip install ninja`)
52+
53+
To rebuild CPU kernels from scratch, run `make clean` first:
54+
55+
```bash
56+
make -C kernels/bit_1/cpu clean && make -C kernels/bit_1/cpu
57+
make -C kernels/bit_1_58/cpu clean && make -C kernels/bit_1_58/cpu
58+
```
59+
3860
*Run tests with `pytest`.*
3961

4062
### Prepare a model (once) 🧱

0 commit comments

Comments
 (0)