@@ -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.
### 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.