Skip to content

Commit c1e2b3a

Browse files
authored
Merge branch 'main' into main
2 parents 2e27121 + 5f50e3a commit c1e2b3a

File tree

9 files changed

+440
-97
lines changed

9 files changed

+440
-97
lines changed

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
That would be awesome if you want to contribute something to BitBLAS!
3+
That would be awesome if you want to contribute something to TileLang!
44

55
- [Contributing](CONTRIBUTING.md#contributing)
66
- [Reporting Bugs](CONTRIBUTING.md#reporting-bugs)
@@ -11,7 +11,7 @@ That would be awesome if you want to contribute something to BitBLAS!
1111

1212
## Reporting Bugs
1313

14-
If you run into any weird behavior while using BitBLAS, 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.
14+
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.
1515

1616
Any issue you open must include:
1717

@@ -25,15 +25,15 @@ Please ask questions in issues.
2525

2626
## Submitting Pull Requests
2727

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

3030
Please run `./format.sh` before submitting a pull request to make sure that your code is formatted correctly.
3131

3232
Please include tests and docs with every pull request!
3333

3434
## Repository Setup
3535

36-
To run the build, you need to have the BitBLAS repository cloned to your computer. After that, you need to `cd` into the directory where you cloned it, and install the dependencies with `python`:
36+
To run the build, you need to have the TileLang repository cloned to your computer. After that, you need to `cd` into the directory where you cloned it, and install the dependencies with `python`:
3737

3838
```bash
3939
python setup.py install

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ pip install . # with -e option if you want to install in editable mode
7171

7272
### Method 2: Build from Source
7373
We currently provide three ways to install **tile-lang** from source:
74-
- [Install from Source (using your own TVM installation)](./docs/Installation.md#install-from-source-with-your-own-tvm-installation)
75-
- [Install from Source (using the bundled TVM submodule)](./docs/Installation.md#install-from-source-with-our-tvm-submodule)
76-
- [Install Using the Provided Script](./docs/Installation.md#install-with-provided-script)
74+
- [Install from Source (using your own TVM installation)](./docs/get_started/Installation.rst#method-1-install-from-source-using-your-own-tvm-installation)
75+
- [Install from Source (using the bundled TVM submodule)](./docs/get_started/Installation.rst#method-2-install-from-source-with-our-tvm-submodule)
76+
- [Install Using the Provided Script](./docs/get_started/Installation.rst##method-3-install-using-the-provided-script)
7777

7878

7979
## Quick Start
@@ -192,6 +192,12 @@ In addition to GEMM, we provide a variety of examples to showcase the versatilit
192192

193193
TileLang has now been used in project [BitBLAS](https://github.com/microsoft/BitBLAS).
194194

195+
## Join the Discussion
196+
197+
Welcome to join our Discord community for discussions, support, and collaboration!
198+
199+
[![Join our Discord](https://img.shields.io/badge/Discord-Join%20Us-blue?logo=discord&style=for-the-badge)](https://discord.gg/TUrHyJnKPG)
200+
195201
## Acknowledgements
196202

197203
We learned a lot from the [TVM](https://github.com/apache/tvm) community and would like to thank them for their contributions. The initial version of this project is mainly contributed by [LeiWang1999](https://github.com/LeiWang1999), [chengyupku](https://github.com/chengyupku) and [nox-410](https://github.com/nox-410). Part of this work was done during the internship at Microsoft Research, under the supervision of Dr. Lingxiao Ma, Dr. Yuqing Xia, Dr. Jilong Xue, and Dr. Fan Yang.

SECURITY.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

SUPPORT.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/get_started/Installation.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
Installation Guide
23
==================
34

@@ -65,7 +66,7 @@ After installing the prerequisites, you can clone the TileLang repository and in
6566
.. code:: bash
6667
6768
git clone --recursive https://github.com/tile-ai/tilelang.git
68-
cd TileLang
69+
cd tileLang
6970
pip install . # Please be patient, this may take some time.
7071
7172
If you want to install TileLang in development mode, you can run the following command:
@@ -76,11 +77,13 @@ If you want to install TileLang in development mode, you can run the following c
7677
7778
We currently provide three methods to install **TileLang**:
7879

79-
1. Install from Source (using your own TVM installation)
80-
81-
2. Install from Source (using the bundled TVM submodule)
80+
1. `Install from Source (using your own TVM installation)`_
81+
2. `Install from Source (using the bundled TVM submodule)`_
82+
3. `Install Using the Provided Script`_
8283

83-
3. Install Using the Provided Script
84+
.. _Install from Source (using your own TVM installation): #method-1-install-from-source-using-your-own-tvm-installation
85+
.. _Install from Source (using the bundled TVM submodule): #method-2-install-from-source-using-the-bundled-tvm-submodule
86+
.. _Install Using the Provided Script: #method-3-install-using-the-provided-script
8487

8588

8689
Method 1: Install from Source (Using Your Own TVM Installation)
@@ -93,7 +96,7 @@ If you already have a compatible TVM installation, follow these steps:
9396
.. code:: bash
9497
9598
git clone --recursive https://github.com/tile-ai/tilelang
96-
cd TileLang
99+
cd tilelang
97100
98101
**Note**: Use the `--recursive` flag to include necessary submodules.
99102

@@ -114,7 +117,7 @@ If you already have a compatible TVM installation, follow these steps:
114117

115118
.. code:: bash
116119
117-
export PYTHONPATH=/your/path/to/tile-lang/python:$PYTHONPATH
120+
export PYTHONPATH=/your/path/to/tilelang/:$PYTHONPATH
118121
# TVM_IMPORT_PYTHON_PATH is used by 3rd-party frameworks to import TVM
119122
export TVM_IMPORT_PYTHON_PATH=/your/path/to/tvm/python
120123
@@ -128,7 +131,7 @@ If you prefer to use the built-in TVM version, follow these instructions:
128131
.. code:: bash
129132
130133
git clone --recursive https://github.com/tile-ai/tilelang
131-
cd TileLang
134+
cd tilelang
132135
133136
**Note**: Ensure the `--recursive` flag is included to fetch submodules.
134137

@@ -155,7 +158,7 @@ If you prefer to use the built-in TVM version, follow these instructions:
155158

156159
.. code:: bash
157160
158-
export PYTHONPATH=/your/path/to/TileLang/python:$PYTHONPATH
161+
export PYTHONPATH=/your/path/to/tilelang/:$PYTHONPATH
159162
160163
Method 3: Install Using the Provided Script
161164
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -167,11 +170,11 @@ For a simplified installation, use the provided script:
167170
.. code:: bash
168171
169172
git clone --recursive https://github.com/tile-ai/tilelang
170-
cd TileLang
173+
cd tilelang
171174
172175
2. **Run the Installation Script**:
173176

174177
.. code:: bash
175178
176-
bash install.sh
179+
bash install_cuda.sh
177180
# or bash `install_amd.sh` if you want to enable ROCm runtime
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
import tilelang
19+
import tilelang.testing
20+
from tilelang import language as T
21+
22+
23+
class BaseCompare(tilelang.testing.CompareBeforeAfter):
24+
transform = tilelang.transform.AnnotateDeviceRegions()
25+
26+
27+
class TestAnnotateThreadExtent(BaseCompare):
28+
"""Annotation inserted at the "thread_extent" attribute"""
29+
30+
def before(A: T.Buffer(16, "float32")):
31+
T.func_attr({"target": T.target("cuda", host="llvm")})
32+
i = T.launch_thread("threadIdx.x", 16)
33+
A[i] = 0.0
34+
35+
def expected(A: T.Buffer(16, "float32")):
36+
T.func_attr({"target": T.target("cuda", host="llvm")})
37+
T.attr(T.target("cuda"), "target", 0)
38+
i = T.launch_thread("threadIdx.x", 16)
39+
A[i] = 0.0
40+
41+
42+
class TestAnnotateDeviceScope(BaseCompare):
43+
"""Annotation inserted at the "device_scope" attribute"""
44+
45+
def before(A: T.Buffer(1, "float32")):
46+
T.func_attr({"target": T.target("cuda", host="llvm")})
47+
T.attr(0, "device_scope", 0)
48+
A[0] = 0.0
49+
50+
def expected(A: T.Buffer(1, "float32")):
51+
T.func_attr({"target": T.target("cuda", host="llvm")})
52+
T.attr(T.target("cuda"), "target", 0)
53+
T.attr(0, "device_scope", 0)
54+
A[0] = 0.0
55+
56+
57+
if __name__ == "__main__":
58+
tilelang.testing.main()

0 commit comments

Comments
 (0)