Unverified Commit 899f7bd5 authored by Chaofan Lin's avatar Chaofan Lin Committed by GitHub
Browse files

[Docs] Improve installation instructions for developers (#1450)

parent 0b6336b5
......@@ -81,6 +81,8 @@ in the main directory. This installation is removable by:
python3 -m pip uninstall tilelang
```
We also recommend installing TileLang in a more manual way for better control over the build process, by compiling the C++ extensions first and set the `PYTHONPATH`. See [Working from Source via `PYTHONPATH`](https://tilelang.com/get_started/Installation.html#working-from-source-via-pythonpath) for detailed instructions.
## Lint Check
To check the linting, run:
......
......@@ -69,9 +69,9 @@ pip install -e . -v
(working-from-source-via-pythonpath)=
### Working from Source via `PYTHONPATH`
### Working from Source via `PYTHONPATH` (Recommended for Developers)
If you prefer to work directly from the source tree via `PYTHONPATH`, make sure the native extension is built first:
If you prefer to work directly from the source tree via `PYTHONPATH` instead of using pip, make sure the native extension (`libtilelang.so`) is built first:
```bash
mkdir -p build
......@@ -79,6 +79,14 @@ cd build
cmake .. -DUSE_CUDA=ON
make -j
```
We also recommend using `ninja` to speed up compilation:
```bash
cmake .. -DUSE_CUDA=ON -G Ninja
ninja
```
Then add the repository root to `PYTHONPATH` before importing `tilelang`, for example:
```bash
......@@ -229,8 +237,17 @@ Developers who needs to recompile frequently could use:
```bash
pip install -r requirements-dev.txt
# For first time compilation
pip install -e . -v --no-build-isolation
# Or manually compile with cmake/ninja. Remember to set PYTHONPATH properly.
mkdir build
cd build
cmake .. -G Ninja
ninja
# Rebuild when you change the cpp code
cd build; ninja
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment