"...git@developer.sourcefind.cn:yangql/composable_kernel.git" did not exist on "aafc3ac27a4d448b728a241fd6072005b87df22f"
CONTRIBUTING.md 3.27 KB
Newer Older
1
2
# Contributing

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

5
### Table of Contents  <!-- omit in toc --> <!-- markdownlint-disable heading-increment -->
6

7
8
9
10
11
12
13
14
15
16
17
- [Report Bugs](#report-bugs)
- [Ask Questions](#ask-questions)
- [Submit Pull Requests](#submit-pull-requests)
- [Setup Development Environment](#setup-development-environment)
- [Install Develop Version](#install-develop-version)
- [Lint Check](#lint-check)
- [Test Locally](#test-locally)
- [Build Wheels](#build-wheels)
- [Documentation](#documentation)

## Report Bugs
18

19
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.
20
21
22
23
24
25

Any issue you open must include:

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

26
## Ask Questions
27
28
29

Please ask questions in issues.

30
## Submit Pull Requests
31

32
All pull requests are super welcomed and greatly appreciated! Issues in need of a solution are marked with a [`♥ help`](https://github.com/ianstormtaylor/TileLang/issues?q=is%3Aissue+is%3Aopen+label%3A%22%E2%99%A5+help%22) label if you're looking for somewhere to start.
33

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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!

## Setup Development Environment

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

1. Fork TileLang ([fork](https://github.com/tile-ai/tilelang/fork)) on GitHub and clone the repository.

    ```bash
    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:

    ```bash
    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`](https://pre-commit.com) hooks:

    ```bash
    pre-commit install --install-hooks
    ```
67

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

70
## Install Develop Version
71

72
To install TileLang in an "editable" mode, run:
73
74

```bash
75
python3 -m pip install --no-build-isolation --verbose --editable .
76
77
```

78
in the main directory. This installation is removable by:
79

80
81
82
83
```bash
python3 -m pip uninstall tilelang
```

84
85
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.

86
87
88
89
90
91
92
93
94
## Lint Check

To check the linting, run:

```bash
pre-commit run --all-files
```

## Test Locally
95

96
To run the tests, start by building the project as described in the [Setup Development Environment](#setup-development-environment) section.
97
98
99

Then you can rerun the tests with:

100
101
```bash
python3 -m pytest testing
102
103
```

104
105
106
107
108
109
110
## Build Wheels

_TBA_

## Documentation

_TBA_