Files
tilelang/CONTRIBUTING.md
morluto 905c75a9c0 [Docs] Fix stale repository links (#2857)
docs: fix stale repository links
2026-08-26 16:13:12 +08:00

4.0 KiB

Contributing

That would be awesome if you want to contribute something to TileLang!

Table of Contents

Report Bugs

If you run into any weird behavior while using TileLang, feel free to open a new issue in this repository! Please run a search before opening a new issue, to make sure that someone else hasn't already reported or solved the bug you've found.

Any issue you open must include:

  • Code snippet that reproduces the bug with a minimal setup.
  • A clear explanation of what the issue is.

Ask Questions

Please ask questions in issues.

Submit Pull Requests

All pull requests are super welcomed and greatly appreciated! Issues in need of a solution are marked with a ♥ help label if you're looking for somewhere to start.

If you're new to contributing to TileLang, you can follow the following guidelines before submitting a pull request.

Note

Please include tests and docs with every pull request if applicable!

Coding Style

Run the repository formatter on the files touched by your pull request:

bash format.sh --files <changed-file>...

Python code is checked with Ruff through pre-commit. C and C++ code is checked with clang-format, and TileLang-owned C++ APIs should follow the C++ Style Guide for naming, TVM object usage, header boundaries, and incremental migration.

For a focused C++ API naming or header-boundary cleanup, run the advisory audit locally:

python3 maint/scripts/audit_cpp_api_style.py

The audit is a review aid, not a blanket rename command. Check each finding for FFI visibility, generated code, backend shims, and external API constraints before changing it.

Setup Development Environment

Before contributing to TileLang, please follow the instructions below to setup.

  1. Fork TileLang (fork) on GitHub and clone the repository.

    git clone --recurse-submodules git@github.com:<your username>/tilelang.git  # use the SSH protocol
    cd tilelang
    
    git remote add upstream git@github.com:tile-ai/tilelang.git
    
  2. Setup a development environment:

    uv venv --seed .venv  # use `python3 -m venv .venv` if you don't have `uv`
    
    source .venv/bin/activate
    python3 -m pip install --upgrade pip setuptools wheel "build[uv]"
    uv pip install --requirements requirements-dev.txt
    
  3. Setup the pre-commit hooks:

    pre-commit install --install-hooks
    

Then you are ready to rock. Thanks for contributing to TileLang!

Install Develop Version

To install TileLang in an "editable" mode, run:

python3 -m pip install --no-build-isolation --verbose --editable .

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 for detailed instructions.

Lint Check

To check the linting, run:

pre-commit run --all-files

Test Locally

To run the tests, start by building the project as described in the Setup Development Environment section.

Then you can rerun the tests with:

python3 -m pytest testing

Build Wheels

TBA

Documentation

TBA