Skip to content
Merged
Show file tree
Hide file tree
Changes from 109 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
711367c
cleanup
oraluben Oct 5, 2025
e4a024a
init
oraluben Oct 5, 2025
e86bf86
build first wheel that may not work
oraluben Oct 5, 2025
1ef1e3f
build cython ext
oraluben Oct 5, 2025
767b1b3
fix tvm build
oraluben Oct 5, 2025
c7a5b6b
use sabi
oraluben Oct 5, 2025
e21ddd9
update rpath to support auditwheel
oraluben Oct 5, 2025
d1cc5d6
pass editible build
oraluben Oct 5, 2025
4c0ebe4
update ci
oraluben Oct 5, 2025
b14db98
fix warnings
oraluben Oct 5, 2025
76e9df7
do not use ccache in self host runner
oraluben Oct 5, 2025
df9ae25
test local uv cache
oraluben Oct 6, 2025
dda4a45
test pip index
oraluben Oct 6, 2025
cfc10f7
update lib search to respect new lib location
oraluben Oct 6, 2025
93f067a
fix
oraluben Oct 6, 2025
6186c04
update ci
oraluben Oct 6, 2025
444700c
enable cuda by default
oraluben Oct 6, 2025
2d0592f
update src map
oraluben Oct 7, 2025
7835895
fix
oraluben Oct 7, 2025
4714c7b
fix
oraluben Oct 7, 2025
631e863
fix
oraluben Oct 7, 2025
3e4d8fe
Generate version with backend and git information at build time
oraluben Oct 7, 2025
03e2424
copy tvm_cython to wheels
oraluben Oct 7, 2025
be422e7
fix tvm lib search
oraluben Oct 7, 2025
e813cec
Merge branch 'main' into sk-build-core
oraluben Oct 7, 2025
ce883ac
fmt
oraluben Oct 7, 2025
f3101c2
remove unused
oraluben Oct 7, 2025
5976a6a
auto detect ccache
oraluben Oct 7, 2025
8423e48
add back backend-related files
oraluben Oct 7, 2025
cb9ff78
remove jit cython adaptor to simplify code
oraluben Oct 7, 2025
5c4240b
fmt
oraluben Oct 7, 2025
b2b7ea3
fix ci
oraluben Oct 7, 2025
a9152be
ci fix 2
oraluben Oct 7, 2025
558b446
ci fix 3
oraluben Oct 7, 2025
b7e4107
workaround metal
oraluben Oct 7, 2025
d1de829
ci fix 4
oraluben Oct 7, 2025
2621eab
fmt
oraluben Oct 7, 2025
216887a
fmt
oraluben Oct 7, 2025
68fc2b2
Revert "ci fix 4"
oraluben Oct 8, 2025
c84008c
tmp
oraluben Oct 8, 2025
7a7144e
fix metal
oraluben Oct 8, 2025
03001e0
trivial cleanup
oraluben Oct 8, 2025
1227ce6
add detailed build-time version for cuda
oraluben Oct 8, 2025
ae13f57
add back mlc
oraluben Oct 8, 2025
3c91e4e
Restore wheel info and other trivial updates
oraluben Oct 8, 2025
605a2a7
update
oraluben Oct 8, 2025
716f2a0
fix cuda
oraluben Oct 8, 2025
f9d387d
upd
oraluben Oct 8, 2025
a7e959a
fix metal ci
oraluben Oct 8, 2025
a392f97
test for ga build
oraluben Oct 8, 2025
9cf48ef
test for nvidia/cuda
oraluben Oct 8, 2025
d074a3c
test ubuntu 20
oraluben Oct 8, 2025
8de0e2e
fix
oraluben Oct 8, 2025
a2071be
fix
oraluben Oct 8, 2025
a32691f
Do not use `uv build`
oraluben Oct 8, 2025
dd0a42d
fix
oraluben Oct 8, 2025
395fd24
fix
oraluben Oct 8, 2025
ae6be4b
log toolchain version
oraluben Oct 8, 2025
d435b25
merge wheel
oraluben Oct 8, 2025
bfe1e42
update
oraluben Oct 8, 2025
2af11f6
debug
oraluben Oct 8, 2025
5270459
fix
oraluben Oct 8, 2025
7561b89
update
oraluben Oct 8, 2025
9db45df
Merge branch 'sk-build-core' of github.com:oraluben/tilelang into sk-…
oraluben Oct 8, 2025
0858946
skip rocm
oraluben Oct 8, 2025
10a87fb
update artifacts each
oraluben Oct 8, 2025
56cd28b
fix
oraluben Oct 8, 2025
59a6a10
fix
oraluben Oct 8, 2025
b03260e
add mac
oraluben Oct 8, 2025
bf246a3
fix cache
oraluben Oct 8, 2025
e13e8a7
fix cache
oraluben Oct 8, 2025
b2c3133
fix cache
oraluben Oct 8, 2025
659225a
reset and add comment
oraluben Oct 9, 2025
988e666
upd
oraluben Oct 9, 2025
afe819f
fix git version
oraluben Oct 9, 2025
1bd2cab
update deps
oraluben Oct 9, 2025
8940863
trivial update
oraluben Oct 9, 2025
5cb5322
Merge branch 'main' into sk-build-core
oraluben Oct 10, 2025
6ab87b0
use in-tree build dir and install to src to speedup editable build
oraluben Oct 10, 2025
3a8d5d0
Merge branch 'main' into sk-build-core
oraluben Oct 10, 2025
fbf01f4
Revert "use in-tree build dir and install to src to speedup editable …
oraluben Oct 10, 2025
0d4a74b
add build-dir
oraluben Oct 10, 2025
47d7537
update docs
oraluben Oct 11, 2025
0e06b95
remove old scrips
oraluben Oct 11, 2025
c8d641b
[1/n] cleanup scripts
oraluben Oct 11, 2025
0724595
[Lint]: [pre-commit.ci] auto fixes [...]
pre-commit-ci[bot] Oct 11, 2025
b1e653e
fix and update
oraluben Oct 11, 2025
e55f34c
wait for tvm fix
oraluben Oct 11, 2025
85d0df0
Merge remote-tracking branch 'upstream/main' into sk-build-core
oraluben Oct 11, 2025
5592fd0
revert some tmp fix
oraluben Oct 11, 2025
665ba44
fix
oraluben Oct 11, 2025
e5230cb
fix
oraluben Oct 11, 2025
1078714
spell
oraluben Oct 11, 2025
74dabc4
doc update
oraluben Oct 11, 2025
695f128
test cibuildwheel
oraluben Oct 12, 2025
a7eaee1
Merge branch 'main' into sk-build-core
oraluben Oct 12, 2025
c174093
fix and test macos on ci
oraluben Oct 12, 2025
01c7c5a
Update .github/workflows/dist.yml
oraluben Oct 12, 2025
707d433
fix
oraluben Oct 12, 2025
54b40fa
test ga event
oraluben Oct 12, 2025
901de58
cleanup
oraluben Oct 12, 2025
65f3841
bump tvm to support api3
oraluben Oct 12, 2025
5d3415f
test final version
oraluben Oct 12, 2025
1c98b7e
add cron
oraluben Oct 12, 2025
96030a8
Update .github/workflows/dist.yml
oraluben Oct 12, 2025
f184877
fix
oraluben Oct 12, 2025
3eb1b34
Merge branch 'sk-build-core' of github.com:oraluben/tilelang into sk-…
oraluben Oct 12, 2025
110e27a
test ccache for metal cibuildwheel
oraluben Oct 13, 2025
cf0edde
test newer macos
oraluben Oct 13, 2025
44e9644
finish
oraluben Oct 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 27 additions & 52 deletions .github/workflows/cuda-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,49 +12,39 @@ env:
jobs:
format-check:
runs-on: [self-hosted, nvidia]

permissions:
contents: write
env:
UV_INDEX_URL: https://mirrors.bfsu.edu.cn/pypi/web/simple

steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v6
- name: Install python via uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: false
cache-local-path: ${{ runner.tool_cache }}/uv
activate-environment: true
python-version: ${{ env.PYTHON_VERSION }}

- name: Ensure venv (local & persistent)
run: |
set -e
REQS_HASH=$(sha256sum requirements-test.txt 2>/dev/null | awk '{print $1}' || echo "no_requirements")
MARKER="${{ runner.tool_cache }}/.venv_marker_${{ env.PYTHON_VERSION }}_${REQS_HASH:0:8}"

if [[ -f "$MARKER" ]] && [[ -f "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate" ]]; then
echo "venv exists and hash matches – reuse it"
else
echo "venv stale or missing – recreating"
rm -rf "${{ runner.tool_cache }}/${{ env.VENV_DIR }}" "$MARKER"
python -m venv "${{ runner.tool_cache }}/${{ env.VENV_DIR }}"
# shellcheck source=/dev/null
source "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate"
python -m pip install --upgrade pip --no-user
[[ -f requirements-test.txt ]] && \
PIP_NO_BUILD_ISOLATION=1 pip install -r requirements-test.txt --no-user
pip install flash_attn==2.5.8 --no-user --no-build-isolation
touch "$MARKER"
fi
[[ -f requirements-test.txt ]] && \
uv pip install -r requirements-test.txt --no-build-isolation
uv pip install flash_attn==2.5.8 --no-build-isolation

- name: Run format check
run: |
source "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate"
git submodule update --init --recursive
set -ex
mkdir -p build
# run cmake to create the build directory with compile_commands.json
cd build; cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DUSE_CUDA=ON; cd ..
uv pip install cmake
cd build; USE_CUDA=1 cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON; cd ..
if ! output=$(./format.sh 2>&1); then
echo "------------------------------------"
echo "message:"
Expand All @@ -70,56 +60,41 @@ jobs:
needs: format-check
permissions:
contents: read
env:
UV_INDEX_URL: https://mirrors.bfsu.edu.cn/pypi/web/simple
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
submodules: recursive
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Set up Python
uses: actions/setup-python@v6
- name: Install python via uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: false
cache-local-path: ${{ runner.tool_cache }}/uv
activate-environment: true
python-version: ${{ env.PYTHON_VERSION }}

- name: Ensure venv (local & persistent)
- name: Setup venv
run: |
set -e
REQS_HASH=$(cat requirements-test.txt 2>/dev/null || true)
MARKER="${{ runner.tool_cache }}/.venv_marker_${{ env.PYTHON_VERSION }}_${REQS_HASH:0:8}"

if [[ -f "$MARKER" ]] && [[ -f "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate" ]]; then
echo "venv exists and hash matches – reuse it"
else
echo "venv stale or missing – recreating"
rm -rf "${{ runner.tool_cache }}/${{ env.VENV_DIR }}" "$MARKER"
python -m venv "${{ runner.tool_cache }}/${{ env.VENV_DIR }}"
source "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate"
python -m pip install --upgrade pip --no-user
[[ -f requirements-test.txt ]] && \
PIP_NO_BUILD_ISOLATION=1 pip install -r requirements-test.txt --no-user
# flash attention usually requires no isolation build
pip install flash_attn==2.5.8 --no-user --no-build-isolation
pip install . --no-user
touch "$MARKER"
fi
[[ -f requirements-test.txt ]] && \
uv pip install -r requirements-test.txt --no-build-isolation
uv pip install flash_attn==2.5.8 --no-build-isolation

- name: Install project (wheel form)
run: |
source "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate"
pip install . --no-user -v
uv pip install .

- name: Run examples
run: |
source "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate"
cd examples
unset PYTHONPATH
python -m pytest -n 4 **/test*.py -v -r fE --durations=0 --cache-clear

- name: Run tests
run: |
source "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate"
cd testing/python
unset PYTHONPATH
python -m pytest -n 4 -v -r fE --durations=0 --cache-clear --timeout=3600
62 changes: 62 additions & 0 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Dist
on:
schedule:
# gemini said this is 6:00 china time
- cron: '0 22 * * *'
release:
types: [ published ]
pull_request:

env:
PYTHON_VERSION: '3.12'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-wheels:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-16]
include:
- os: ubuntu-22.04
cuda_version: "12.1"
- os: ubuntu-22.04-arm
cuda_version: "12.8"
fail-fast: true
runs-on: ${{ matrix.os }}
env:
CUDA_VERSION: ${{ matrix.cuda_version }}
NO_VERSION_LABEL: ${{ github.event_name != 'release' }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive

- name: ccache
uses: hendrikmuhs/[email protected]
if: startsWith(matrix.os, 'macos')
with:
create-symlink: true
key: ${{ github.job }}-${{ matrix.os }}

- name: Build wheels
uses: pypa/[email protected]
with:
output-dir: wheelhouse
config-file: "{package}/pyproject.toml"

# just for now to list all files
- name: List wheels
id: ls-whl
run: echo "whl_name=$(ls wheelhouse | head -n1)" >> $GITHUB_OUTPUT

- uses: actions/upload-artifact@v4
with:
name: ${{ steps.ls-whl.outputs.whl_name }}.zip
path: wheelhouse/${{ steps.ls-whl.outputs.whl_name }}
compression-level: 0
4 changes: 2 additions & 2 deletions .github/workflows/metal-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Ensure venv (local & persistent)
run: uv pip install -r requirements-test.txt -r requirements-build.txt
run: uv pip install -r requirements-test.txt

- name: Build wheel
run: |
source .venv/bin/activate
uv pip install -v --no-build-isolation .
uv pip install -v .

- name: Run metal test
run: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/rocm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ jobs:
- name: Run format check
run: |
source "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate"
git submodule update --init --recursive
git submodule update --init --recursive --checkout
mkdir -p build
cd build; cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DUSE_ROCM=ON; cd ..
cd build; USE_ROCM=1 cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON; cd ..
if ! output=$(./format.sh 2>&1); then
echo "------------------------------------"
echo "message:"
Expand All @@ -73,7 +73,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
fetch-depth: 1
repository: ${{ github.event.pull_request.head.repo.full_name }}
Comment on lines 74 to 77
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

❓ Verification inconclusive

Please confirm shallow checkout still yields the correct package version.

The new build metadata embeds git tags/hashes; reducing fetch-depth to 1 might drop the annotated tags needed for git describe during the build, which would regress the version string and downstream cache keys. Can you verify the version computation still matches expectations in this workflow?


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Expectation: succeeds and prints the tag that scikit-build-core uses.
git describe --tags --abbrev=0

Length of output: 48


Ensure tags are fetched for version computation
Shallow checkout (fetch-depth: 1) omits annotated tags, causing git describe to fail (fatal: No names found). In .github/workflows/rocm-ci.yml (lines 74–77), replace fetch-depth: 1 with fetch-depth: 0 (or add tags: true) so that all tags are available.

🤖 Prompt for AI Agents
In .github/workflows/rocm-ci.yml around lines 74 to 77, the checkout step uses a
shallow fetch (fetch-depth: 1) which omits annotated tags and causes git
describe to fail; change the checkout configuration to fetch full history/tags
by setting fetch-depth: 0 or adding tags: true so annotated tags are available
for version computation.

ref: ${{ github.event.pull_request.head.ref }}

Expand Down Expand Up @@ -111,6 +111,7 @@ jobs:
run: |
echo "Installing project (wheel form)"
source "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate"
git submodule update --init --recursive --checkout --recommend-shallow
USE_ROCM=True pip install . --no-user

Comment on lines 112 to 116
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Submodules must be synced before the first pip install .

USE_ROCM=True pip install . already runs inside the “Ensure venv” step when the cache is cold, but at that point no submodules have been checked out yet. On a fresh runner the build will fail before reaching this later update. Move the git submodule update ahead of the first install (or drop the early install) so both cold and warm runs succeed.

Apply this diff inside the “Ensure venv (local & persistent)” step:

         if [[ -f requirements-rocm.txt ]]; then
             pip install --pre torch torchvision torchaudio --index-url ${{ env.PYTORCH_INDEX_URL }}
             PIP_NO_BUILD_ISOLATION=1 pip install -r requirements-rocm.txt
         fi

-        USE_ROCM=True pip install . --no-user
+        git submodule update --init --recursive --checkout --recommend-shallow
+        USE_ROCM=True pip install . --no-user
         touch "$MARKER"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
echo "Installing project (wheel form)"
source "${{ runner.tool_cache }}/${{ env.VENV_DIR }}/bin/activate"
git submodule update --init --recursive --checkout --recommend-shallow
USE_ROCM=True pip install . --no-user
if [[ -f requirements-rocm.txt ]]; then
pip install --pre torch torchvision torchaudio --index-url ${{ env.PYTORCH_INDEX_URL }}
PIP_NO_BUILD_ISOLATION=1 pip install -r requirements-rocm.txt
fi
git submodule update --init --recursive --checkout --recommend-shallow
USE_ROCM=True pip install . --no-user
touch "$MARKER"
🤖 Prompt for AI Agents
In .github/workflows/rocm-ci.yml around lines 112 to 116, the workflow runs
`USE_ROCM=True pip install .` before `git submodule update --init --recursive
--checkout --recommend-shallow`, which causes fresh (cold) runners to fail
because submodules are not checked out; move the `git submodule update ...`
command to run before the first `pip install .` in the “Ensure venv (local &
persistent)” step (or alternatively remove the early install and keep a single
install after submodules are updated) so both cold and cached runs have
submodules available before installation.

- name: Run tests
Expand Down
9 changes: 2 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.slo
*.lo
*.o
*.so
*.obj
*.pyc

Expand All @@ -18,7 +19,7 @@

debug/
build/
dist/
*dist/
wheelhouse/
__pycache__
nnfusion.tar.gz
Expand Down Expand Up @@ -82,18 +83,12 @@ models/frozenmodels/
# .ruff_cache
.ruff_cache

# build sdist
build_sdist/

# exclude debug testing folder
!testing/python/debug

# ignore lib with develop mode
tilelang/lib

# tox
.tox/

# cython
tilelang/jit/adapter/cython/.cycache

Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/tvm
Submodule tvm updated from 883e96 to 5bf17a
Loading
Loading