Skip to content

Commit c6b34ef

Browse files
committed
Merge branch 'main' into myfork
2 parents 1d2ff3a + 7cd0da9 commit c6b34ef

File tree

220 files changed

+17643
-1143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+17643
-1143
lines changed

.clang-tidy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ Checks: >
4242
-cppcoreguidelines-pro-type-static-cast-downcast,
4343
-performance-unnecessary-value-param,
4444
-performance-enum-size,
45+
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
46+
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
47+
-clang-analyzer-deadcode.DeadStores,
48+
-clang-analyzer-optin.cplusplus.VirtualCall,
49+
-clang-diagnostic-tautological-constant-compare,
4550
4651
WarningsAsErrors: '*'
4752

.editorconfig

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# https://editorconfig.org/
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_style = space
9+
indent_size = 4
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.{py,pyi}]
14+
indent_size = 4
15+
16+
[*.{cpp,hpp,cxx,cc,c,h,cu,cuh}]
17+
indent_size = 4
18+
19+
[*.{yaml,yml}]
20+
indent_size = 2
21+
22+
[.clang-{format,tidy}]
23+
indent_size = 2
24+
25+
[Makefile]
26+
indent_style = tab
27+
28+
[*.sh]
29+
indent_size = 4
30+
31+
[*.bat]
32+
indent_size = 4
33+
end_of_line = crlf
34+
35+
[*.md]
36+
indent_size = 2
37+
x-soft-wrap-text = true
38+
39+
[*.rst]
40+
indent_size = 4
41+
x-soft-wrap-text = true

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
time: "12:00"
9+
timezone: "Asia/Shanghai"
10+
commit-message:
11+
prefix: "[CI]"

.github/workflows/amd_ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CI Test on AMD
22
on: [pull_request]
33

4+
concurrency:
5+
group: "${{ github.workflow }}-${{ github.ref }}"
6+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
7+
48
env:
59
PYTHON_VERSION: '3.12'
610
VENV_DIR: tilelang_ci
@@ -11,16 +15,16 @@ jobs:
1115
runs-on: [self-hosted, amd, gpu]
1216

1317
permissions:
14-
contents: write
18+
contents: write
1519

1620
steps:
1721
- name: Checkout repository
18-
uses: actions/checkout@v4
22+
uses: actions/checkout@v5
1923
with:
2024
fetch-depth: 0
2125

2226
- name: Set up Python
23-
uses: actions/setup-python@v2
27+
uses: actions/setup-python@v6
2428
with:
2529
python-version: ${{ env.PYTHON_VERSION }}
2630

@@ -67,14 +71,14 @@ jobs:
6771
contents: read
6872
steps:
6973
- name: Checkout repository
70-
uses: actions/checkout@v4
74+
uses: actions/checkout@v5
7175
with:
7276
fetch-depth: 0
7377
repository: ${{ github.event.pull_request.head.repo.full_name }}
7478
ref: ${{ github.event.pull_request.head.ref }}
7579

7680
- name: Set up Python
77-
uses: actions/setup-python@v2
81+
uses: actions/setup-python@v6
7882
with:
7983
python-version: ${{ env.PYTHON_VERSION }}
8084

@@ -84,7 +88,7 @@ jobs:
8488
set -e
8589
REQS_HASH=$(sha256sum requirements-rocm.txt | cut -d ' ' -f 1)
8690
MARKER="${{ runner.tool_cache }}/.venv_marker_${{ env.PYTHON_VERSION }}_${REQS_HASH:0:8}"
87-
91+
8892
echo "Installing requirements"
8993
if [[ -f "$MARKER" ]] && [[ -f "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate" ]]; then
9094
echo "venv exists and hash matches – reuse it"
@@ -115,4 +119,4 @@ jobs:
115119
source "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate"
116120
cd testing/python/amd
117121
unset PYTHONPATH
118-
python -m pytest -v test_tilelang_test_amd.py --durations=0 --timeout=3600
122+
python -m pytest -v --cache-clear test_tilelang_test_amd.py

.github/workflows/bot.yml

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

3-
on:
3+
on:
44
issue_comment:
55
types: [created]
66

@@ -16,13 +16,13 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v5
2020
with:
2121
ref: refs/pull/${{ github.event.issue.number }}/merge
2222
fetch-depth: 0
2323

2424
- name: Set up Python
25-
uses: actions/setup-python@v2
25+
uses: actions/setup-python@v6
2626
with:
2727
python-version: '3.9'
2828

@@ -36,7 +36,7 @@ jobs:
3636
- name: Build original version
3737
run: |
3838
echo "Check files to be deleted!"
39-
git clean -dxn | grep -v 'tll/' | xargs -I{} echo {}
39+
git clean -dxn | grep -v 'tll/' | xargs -I{} echo {}
4040
git clean -dxn | grep -v 'tll/' | xargs -I{} rm -rf {}
4141
echo "Delete files completed!"
4242
git checkout main

.github/workflows/ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CI
22
on: [pull_request]
33

4+
concurrency:
5+
group: "${{ github.workflow }}-${{ github.ref }}"
6+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
7+
48
env:
59
PYTHON_VERSION: '3.12'
610
VENV_DIR: tilelang_ci
@@ -10,16 +14,16 @@ jobs:
1014
runs-on: [self-hosted, nvidia]
1115

1216
permissions:
13-
contents: write
17+
contents: write
1418

1519
steps:
1620
- name: Checkout repository
17-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
1822
with:
1923
fetch-depth: 0
2024

2125
- name: Set up Python
22-
uses: actions/setup-python@v2
26+
uses: actions/setup-python@v6
2327
with:
2428
python-version: ${{ env.PYTHON_VERSION }}
2529

@@ -68,14 +72,14 @@ jobs:
6872
contents: read
6973
steps:
7074
- name: Checkout repository
71-
uses: actions/checkout@v4
75+
uses: actions/checkout@v5
7276
with:
7377
fetch-depth: 0
7478
repository: ${{ github.event.pull_request.head.repo.full_name }}
7579
ref: ${{ github.event.pull_request.head.ref }}
7680

7781
- name: Set up Python
78-
uses: actions/setup-python@v2
82+
uses: actions/setup-python@v6
7983
with:
8084
python-version: ${{ env.PYTHON_VERSION }}
8185

@@ -111,11 +115,11 @@ jobs:
111115
source "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate"
112116
cd examples
113117
unset PYTHONPATH
114-
python -m pytest -n 4 **/test*.py -v -r fE --durations=0
118+
python -m pytest -n 4 **/test*.py -v -r fE --durations=0 --cache-clear
115119
116120
- name: Run tests
117121
run: |
118122
source "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate"
119123
cd testing/python
120124
unset PYTHONPATH
121-
python -m pytest -n 4 -v -r fE --durations=0 --timeout=3600
125+
python -m pytest -n 4 -v -r fE --durations=0 --cache-clear --timeout=3600

.github/workflows/dependabot.yml

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

.github/workflows/metal_ci.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: CI Test on Metal
2+
on: [pull_request]
3+
4+
concurrency:
5+
group: "${{ github.workflow }}-${{ github.ref }}"
6+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
7+
8+
env:
9+
PYTHON_VERSION: '3.12'
10+
VENV_DIR: tilelang_ci
11+
12+
jobs:
13+
format-check:
14+
runs-on: [macos-latest]
15+
16+
permissions:
17+
contents: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v5
22+
with:
23+
fetch-depth: 0
24+
submodules: recursive
25+
26+
- name: Install python via uv
27+
uses: astral-sh/setup-uv@v7
28+
with:
29+
enable-cache: true
30+
ignore-nothing-to-cache: true
31+
activate-environment: true
32+
python-version: ${{ env.PYTHON_VERSION }}
33+
34+
- name: Ensure venv (local & persistent)
35+
run: |
36+
[[ -f requirements-test.txt ]] && \
37+
uv pip install -r requirements-test.txt --no-build-isolation
38+
39+
- name: Run format check
40+
run: |
41+
set -ex
42+
mkdir -p build
43+
# run cmake to create the build directory with compile_commands.json
44+
cd build; cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DUSE_METAL=ON; cd ..
45+
if ! output=$(./format.sh 2>&1); then
46+
echo "------------------------------------"
47+
echo "message:"
48+
echo "$output"
49+
printf '%s\n' "$output"
50+
echo "------------------------------------"
51+
exit 1
52+
fi
53+
54+
build-test-metal:
55+
runs-on: [macos-latest]
56+
needs: format-check
57+
permissions:
58+
contents: read
59+
env:
60+
CMAKE_C_COMPILER_LAUNCHER: ccache
61+
CMAKE_CXX_COMPILER_LAUNCHER: ccache
62+
steps:
63+
- name: Checkout repository
64+
uses: actions/checkout@v5
65+
with:
66+
fetch-depth: 1
67+
submodules: recursive
68+
69+
- name: ccache
70+
uses: hendrikmuhs/ccache-action@v1.2
71+
with:
72+
create-symlink: true
73+
key: ${{ github.job }}-${{ matrix.os }}
74+
75+
- name: Install python via uv
76+
uses: astral-sh/setup-uv@v7
77+
with:
78+
enable-cache: true
79+
ignore-nothing-to-cache: true
80+
activate-environment: true
81+
python-version: ${{ env.PYTHON_VERSION }}
82+
83+
- name: Ensure venv (local & persistent)
84+
run: uv pip install -r requirements-test.txt -r requirements-build.txt
85+
86+
- name: Build wheel
87+
run: |
88+
source .venv/bin/activate
89+
uv pip install -v --no-build-isolation .
90+
91+
- name: Run metal test
92+
run: |
93+
cd testing/python
94+
unset PYTHONPATH
95+
python -m pytest -k metal -v -r fE --durations=0 --cache-clear --timeout=3600

.github/workflows/publish_docs.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ permissions:
1212
jobs:
1313
docs:
1414
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' }} || ${{ github.event_name == 'workflow_dispatch' }}
15-
runs-on: [self-hosted]
15+
runs-on: [self-hosted, nvidia]
1616
steps:
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-python@v5
17+
- uses: actions/checkout@v5
18+
- uses: actions/setup-python@v6
1919
with:
2020
python-version: '3.10'
2121
- name: Build docs
@@ -41,4 +41,3 @@ jobs:
4141
else
4242
echo "No changes detected, skipping commit and push."
4343
fi
44-

.github/workflows/reminder.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Remind
10-
uses: actions/github-script@v7
10+
uses: actions/github-script@v8
1111
with:
1212
script: |
1313
github.rest.issues.createComment({
@@ -20,4 +20,4 @@ jobs:
2020
'🚀'
2121
})
2222
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)