Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
tilelang
Commits
bbbf4207
Unverified
Commit
bbbf4207
authored
Nov 14, 2025
by
guchaoyang
Committed by
GitHub
Nov 14, 2025
Browse files
Merge branch 'main' into dcu
parents
8f4628e0
5eb30a4f
Changes
286
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
276 additions
and
128 deletions
+276
-128
.clang-tidy
.clang-tidy
+1
-1
.github/ISSUE_TEMPLATE/release-plan.yml
.github/ISSUE_TEMPLATE/release-plan.yml
+63
-0
.github/workflows/ci.yml
.github/workflows/ci.yml
+16
-15
.github/workflows/dist.yml
.github/workflows/dist.yml
+33
-25
.github/workflows/pr-perfbench-bot.yml
.github/workflows/pr-perfbench-bot.yml
+17
-1
.gitignore
.gitignore
+7
-0
.pre-commit-config.yaml
.pre-commit-config.yaml
+1
-1
3rdparty/tvm
3rdparty/tvm
+1
-1
CMakeLists.txt
CMakeLists.txt
+118
-40
MANIFEST.in
MANIFEST.in
+0
-35
README.md
README.md
+1
-0
VERSION
VERSION
+1
-1
cmake/load_tvm.cmake
cmake/load_tvm.cmake
+10
-1
docker/Dockerfile.cu118
docker/Dockerfile.cu118
+1
-1
docker/Dockerfile.cu120
docker/Dockerfile.cu120
+1
-1
docker/Dockerfile.cu121
docker/Dockerfile.cu121
+1
-1
docker/Dockerfile.cu123
docker/Dockerfile.cu123
+1
-1
docker/Dockerfile.cu124
docker/Dockerfile.cu124
+1
-1
docker/Dockerfile.cu125
docker/Dockerfile.cu125
+1
-1
docker/Dockerfile.cu126
docker/Dockerfile.cu126
+1
-1
No files found.
.clang-tidy
View file @
bbbf4207
---
InheritParentConfig: true
ExtraArgs: [
'-v'
]
ExtraArgs: []
FormatStyle: file
UseColor: true
WarningsAsErrors: '*'
...
...
.github/ISSUE_TEMPLATE/release-plan.yml
0 → 100644
View file @
bbbf4207
name
:
"
Release
Plan"
description
:
"
Plan
the
next
release"
title
:
"
[Release
Plan]
vX.Y.Z"
labels
:
-
release-plan
-
tracking
assignees
:
[]
body
:
-
type
:
input
id
:
version
attributes
:
label
:
"
Version"
placeholder
:
"
v0.2.0"
validations
:
required
:
true
-
type
:
input
id
:
milestone
attributes
:
label
:
"
Milestone"
description
:
"
Link
or
name
of
the
milestone
for
this
release"
placeholder
:
"
https://github.com/tile-ai/tilelang/milestone/XX"
-
type
:
textarea
id
:
scope
attributes
:
label
:
"
Scope"
description
:
"
Goals
and
non-goals
(brief)"
placeholder
:
|
- Goals: ...
- Non-goals: ...
-
type
:
textarea
id
:
tasks
attributes
:
label
:
"
Tasks"
description
:
"
Task
list;
link
issues/PRs"
value
:
|
- [ ] Features
- [ ] Fixes
- [ ] Docs
- [ ] API/Breaking changes
- [ ] Benchmarks
- [ ] Release notes
-
type
:
checkboxes
id
:
readiness
attributes
:
label
:
"
Readiness"
options
:
-
label
:
"
All
planned
issues
closed
or
deferred"
-
label
:
"
Docs
updated"
-
label
:
"
CI
green;
artifacts
verified"
-
label
:
"
Release
notes
drafted"
-
type
:
textarea
id
:
notes
attributes
:
label
:
"
Notes"
description
:
"
Risks
or
communications
(optional)"
placeholder
:
|
- Risk: ...
- Communication: ...
.github/workflows/ci.yml
View file @
bbbf4207
...
...
@@ -22,10 +22,12 @@ env:
PYTHONDEVMODE
:
"
1"
PYTHONUNBUFFERED
:
"
1"
PYTHONPATH
:
"
"
# explicit cleanup
PIP_USER
:
"
"
# explicit cleanup
COLUMNS
:
"
100"
FORCE_COLOR
:
"
1"
CLICOLOR_FORCE
:
"
1"
UV_INDEX_STRATEGY
:
"
unsafe-best-match"
UV_HTTP_TIMEOUT
:
"
600"
XDG_CACHE_HOME
:
"
${{
github.workspace
}}/.cache"
# to be updated
PIP_CACHE_DIR
:
"
${{
github.workspace
}}/.cache/pip"
# to be updated
UV_CACHE_DIR
:
"
${{
github.workspace
}}/.cache/uv"
# to be updated
...
...
@@ -44,7 +46,7 @@ jobs:
submodules
:
recursive
-
name
:
Setup Python
3.8
id
:
setup-py
38
id
:
setup-py
lowest
uses
:
actions/setup-python@v6
with
:
python-version
:
"
3.8"
# use lowest supported version for linting
...
...
@@ -52,12 +54,12 @@ jobs:
-
name
:
Check AST with Python
3.8
run
:
|
"${{ steps.setup-py
38
.outputs.python-path }}" -m compileall -q -f tilelang
"${{ steps.setup-py
lowest
.outputs.python-path }}" -m compileall -q -f tilelang
-
name
:
Setup Python
3.
12
-
name
:
Setup Python
3.
9
uses
:
actions/setup-python@v6
with
:
python-version
:
"
3.
12
"
python-version
:
"
3.
9
"
update-environment
:
true
cache
:
pip
cache-dependency-path
:
|
...
...
@@ -127,13 +129,6 @@ jobs:
echo "UV_CACHE_DIR=${XDG_CACHE_HOME}/uv" | tee -a "${GITHUB_ENV}"
echo "PRE_COMMIT_HOME=${XDG_CACHE_HOME}/pip/.pre-commit" | tee -a "${GITHUB_ENV}"
-
name
:
Set environment (GitHub-hosted runners)
if
:
${{ !startsWith(matrix.runner.name, 'self-hosted') }}
run
:
|
# Enable ccache on GitHub-hosted runners to speed up builds
echo "CMAKE_C_COMPILER_LAUNCHER=ccache" | tee -a "${GITHUB_ENV}"
echo "CMAKE_CXX_COMPILER_LAUNCHER=ccache" | tee -a "${GITHUB_ENV}"
# Do not use ccache on self-hosted runners, as it will download/upload caches which is slow.
# Self-hosted runners usually have more CPU power to compile without ccache.
-
name
:
Setup ccache (GitHub-hosted runners)
...
...
@@ -142,8 +137,13 @@ jobs:
uses
:
hendrikmuhs/ccache-action@v1
with
:
create-symlink
:
true
key
:
ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}-${{ matrix.runner.name }}-${{ matrix.runner.toolkit }}
evict-old-files
:
"
7d"
append-timestamp
:
false
key
:
${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner.toolkit }}-${{ hashFiles('**/*.cc') }}
restore-keys
:
|
${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner.toolkit }}-${{ hashFiles('**/*.cc') }}
${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner.toolkit }}
${{ runner.os }}-${{ runner.arch }}
-
name
:
Set environment (CUDA)
if
:
contains(matrix.runner.toolkit, 'CUDA')
...
...
@@ -298,8 +298,9 @@ jobs:
echo "Using run-clang-tidy from $(command -v run-clang-tidy)"
CLANG_TIDY=(run-clang-tidy)
else
echo "Downloading run-clang-tidy script"
wget -O run-clang-tidy.py https://raw.githubusercontent.com/llvm/llvm-project/refs/heads/release/21.x/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
RCT_URL=https://raw.githubusercontent.com/llvm/llvm-project/refs/heads/release/21.x/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
echo "Downloading run-clang-tidy script from ${RCT_URL}"
echo "import urllib.request; url = '${RCT_URL}'.rstrip('/'); urllib.request.urlretrieve(url, url.split('/')[-1])" | uv run --no-project --script -
CLANG_TIDY=(uv run --no-project --script -- run-clang-tidy.py)
fi
if [[ -x "$(command -v clang-apply-replacements)" ]]; then
...
...
@@ -378,7 +379,7 @@ jobs:
pytest --verbose --color=yes --durations=0 --showlocals --cache-clear
)
"${PYTEST[@]}" --maxfail=3 --numprocesses=4 \
./python/amd
/test_tilelang_test_amd.py
./python/amd
# Apple Metal tests
-
name
:
Run Metal tests with Python ${{ matrix.python-version }} (${{ matrix.runner.toolkit }})
...
...
.github/workflows/dist.yml
View file @
bbbf4207
...
...
@@ -44,12 +44,11 @@ jobs:
runs-on
:
macos-latest
timeout-minutes
:
30
env
:
NO_VERSION_LABEL
:
${{ github.event_name == 'release' && 'OFF' || 'ON' }}
# NO_GIT_VERSION disables embedding the git commit hash in version metadata.
# `NO_VERSION_LABEL=ON` disables embedding the toolchain / git commit hash in version metadata.
# Otherwise, the version of the SDist has a git hash suffix (e.g., 0.1.0+gitabcdef12),
# but the package built from the SDist has no way to get the git hash (it is not a git repo),
# leading to inconsistent versions between SDist and built packages (+gitabcdef12 vs. +gitunknown).
NO_
GIT_
VERSION
:
"
ON
"
NO_VERSION
_LABEL
:
'
ON
'
steps
:
-
name
:
Checkout repository
...
...
@@ -73,24 +72,26 @@ jobs:
uses
:
hendrikmuhs/ccache-action@v1
with
:
create-symlink
:
true
key
:
ccache-${{ runner.os }}-${{ runner.arch }}
evict-old-files
:
"
7d"
append-timestamp
:
false
key
:
sdist-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.cc') }}
restore-keys
:
|
sdist-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.cc') }}
sdist-${{ runner.os }}-${{ runner.arch }}
${{ runner.os }}-${{ runner.arch }}
-
name
:
Test SDist buildable
run
:
|
TEMP_DIR="$(mktemp -d -t tilelang-sdist-test)"
cp -r dist "${TEMP_DIR}/dist"
uv venv --seed "${TEMP_DIR}/venv"
source "${TEMP_DIR}/venv/bin/activate"
cd "${TEMP_DIR}"
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install -v dist/*.tar.gz
uv pip install -v dist/*.tar.gz
python3 -c "import tilelang; print(tilelang.__version__)"
-
name
:
Upload SDist
# Not PR to save artifact storage, as SDist is only needed for releases.
if
:
github.event_name != 'pull_request'
uses
:
actions/upload-artifact@v
4
if
:
github.event_name != 'pull_request'
|| contains(github.event.pull_request.title, '[Release]')
uses
:
actions/upload-artifact@v
5
with
:
name
:
sdist
path
:
dist/*.tar.gz
...
...
@@ -108,14 +109,11 @@ jobs:
-
{
runner
:
ubuntu-24.04-arm
,
toolkit
:
"
CUDA-12.8"
}
-
{
runner
:
macos-latest
,
toolkit
:
"
Metal"
}
python-version
:
-
"
3.8"
# TVM is built with Python 3.8 Limited API, it should work with all Python >= 3.8.
# - "3.9"
# - "3.10"
# - "3.11"
# - "3.12"
# - "3.13"
# - "3.14"
# Wheels are built with Python 3.8 Limited API, they should work with all Python >= 3.8.
# Only build wheels against Python 3.8 Limited API to save CI resources.
# FIXME: Here we use Python 3.9 because our dependency `apache-tvm-ffi` claims to support
# Python 3.8 but it depends on a version of `ml-dtypes` that requires Python >= 3.9.
-
"
3.9"
fail-fast
:
false
timeout-minutes
:
120
runs-on
:
${{ matrix.target.runner }}
...
...
@@ -129,14 +127,19 @@ jobs:
fetch-depth
:
1
submodules
:
recursive
# NB: CIBW builds wheels in containers on Linux
-
name
:
Setup ccache (macOS only)
if
:
runner.os == 'macOS'
-
name
:
Setup ccache
uses
:
hendrikmuhs/ccache-action@v1
with
:
create-symlink
:
true
key
:
ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}-${{ matrix.target.toolkit }}
evict-old-files
:
"
7d"
append-timestamp
:
false
key
:
wheel-${{ runner.os }}-${{ runner.arch }}-${{ matrix.target.toolkit }}-${{ hashFiles('**/*.cc') }}
restore-keys
:
|
wheel-${{ runner.os }}-${{ runner.arch }}-${{ matrix.target.toolkit }}-${{ hashFiles('**/*.cc') }}
wheel-${{ runner.os }}-${{ runner.arch }}-${{ matrix.target.toolkit }}
wheel-${{ runner.os }}-${{ runner.arch }}
${{ runner.os }}-${{ runner.arch }}-${{ matrix.target.toolkit }}
${{ runner.os }}-${{ runner.arch }}
-
name
:
Set CIBW_BUILD
run
:
|
...
...
@@ -151,6 +154,11 @@ jobs:
echo "CUDA_VERSION=${CUDA_VERSION}" | tee -a "${GITHUB_ENV}"
fi
if [[ "${{ runner.os }}" == "Linux" ]]; then
HOST_CCACHE_DIR="$(ccache --get-config cache_dir)"
echo "CIBW_BEFORE_BUILD_LINUX=yum install -y ccache && ccache -o cache_dir=/host${HOST_CCACHE_DIR}" | tee -a "${GITHUB_ENV}"
fi
-
name
:
Build wheels
uses
:
pypa/cibuildwheel@v3.2
with
:
...
...
@@ -160,7 +168,7 @@ jobs:
-
name
:
Upload wheels
# Not PR to save artifact storage, as wheels are only needed for releases.
if
:
github.event_name != 'pull_request'
if
:
github.event_name != 'pull_request'
|| contains(github.event.pull_request.title, '[Release]')
uses
:
actions/upload-artifact@v5
with
:
name
:
wheels-${{ matrix.python-version }}-${{ runner.os }}-${{ runner.arch }}-${{ matrix.target.toolkit }}
...
...
@@ -170,13 +178,13 @@ jobs:
list-artifacts
:
name
:
List artifacts
# Not PR to save artifact storage, as artifacts are only needed for releases.
if
:
github.event_name != 'pull_request'
if
:
github.event_name != 'pull_request'
|| contains(github.event.pull_request.title, '[Release]')
runs-on
:
ubuntu-latest
needs
:
[
build-sdist
,
build-wheels
]
timeout-minutes
:
15
steps
:
-
name
:
Download built SDist
uses
:
actions/download-artifact@v
5
uses
:
actions/download-artifact@v
6
with
:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
...
...
.github/workflows/pr-perfbench-bot.yml
View file @
bbbf4207
...
...
@@ -12,6 +12,17 @@ concurrency:
group
:
"
${{
github.workflow
}}-${{
github.ref
}}"
cancel-in-progress
:
true
# always cancel in-progress
env
:
PYTHONDEVMODE
:
"
1"
PYTHONUNBUFFERED
:
"
1"
PYTHONPATH
:
"
"
# explicit cleanup
PIP_USER
:
"
"
# explicit cleanup
COLUMNS
:
"
100"
FORCE_COLOR
:
"
1"
CLICOLOR_FORCE
:
"
1"
XDG_CACHE_HOME
:
"
${{
github.workspace
}}/.cache"
# to be updated
PIP_CACHE_DIR
:
"
${{
github.workspace
}}/.cache/pip"
# to be updated
jobs
:
perfbench
:
name
:
Benchmark between PR and main
...
...
@@ -31,7 +42,12 @@ jobs:
-
name
:
Setup Python
uses
:
actions/setup-python@v6
with
:
python-version
:
"
3.9"
python-version
:
"
3.12"
update-environment
:
true
cache
:
pip
cache-dependency-path
:
|
pyproject.toml
requirements*.txt
-
name
:
Install merged version
run
:
|
...
...
.gitignore
View file @
bbbf4207
...
...
@@ -20,6 +20,7 @@
debug/
build/
*dist/
dist*/
wheelhouse/
__pycache__
nnfusion.tar.gz
...
...
@@ -101,3 +102,9 @@ tilelang/jit/adapter/cython/.cycache
# CMake
cmake-build/
cmake-build-*/
# Git version for sdist
.git_commit.txt
# pre-commit cache
.pre-commit-cache/*
.pre-commit-config.yaml
View file @
bbbf4207
...
...
@@ -41,7 +41,7 @@ repos:
^.+\.json$
)
-
repo
:
https://github.com/astral-sh/ruff-pre-commit
rev
:
v0.14.
1
# sync with requirements-lint.txt
rev
:
v0.14.
3
# sync with requirements-lint.txt
hooks
:
-
id
:
ruff-check
args
:
[
--fix
,
--exit-non-zero-on-fix
]
...
...
tvm
@
093b2cdb
Compare
5bf17a34
...
093b2cdb
Subproject commit
5bf17a34602931e7d7e01cbccf358a21fe972779
Subproject commit
093b2cdb2187140b197336496d65d61ace89e8ff
CMakeLists.txt
View file @
bbbf4207
...
...
@@ -8,6 +8,11 @@ set(CMAKE_CXX_STANDARD 17)
set
(
CMAKE_POSITION_INDEPENDENT_CODE ON
)
set
(
CMAKE_EXPORT_COMPILE_COMMANDS ON
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
AND
"$ENV{CIBUILDWHEEL}"
)
# Warning came from tvm submodule
string
(
APPEND CMAKE_CXX_FLAGS
" -Wno-dangling-reference"
)
endif
()
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
if
(
EXISTS
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/.gitmodules"
AND EXISTS
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/.git"
)
...
...
@@ -36,15 +41,74 @@ endif()
find_program
(
CCACHE_PROGRAM ccache
)
if
(
CCACHE_PROGRAM
)
message
(
STATUS
"Using ccache:
${
CCACHE_PROGRAM
}
with base_dir=
${
CMAKE_SOURCE_DIR
}
"
)
if
(
APPLE
)
# Passing configs like `ccache base_dir=/xxx cc ...` is supported
# (likely) since ccache 4.x, which has been provided by homebrew.
# Our Linux builder image (manylinux2014 & manylinux_2_28) still
# provides ccache 3.x and do not support this form.
# `cibuildwheel` uses fixed folder on Linux (`/project`) as working directory,
# so cache would work without setting `base_dir`.
set
(
CCACHE_PROGRAM
"
${
CCACHE_PROGRAM
}
;base_dir=
${
CMAKE_SOURCE_DIR
}
"
)
endif
()
set
(
CMAKE_C_COMPILER_LAUNCHER
"
${
CCACHE_PROGRAM
}
"
CACHE STRING
"C compiler launcher"
)
set
(
CMAKE_CXX_COMPILER_LAUNCHER
"
${
CCACHE_PROGRAM
}
"
CACHE STRING
"CXX compiler launcher"
)
set
(
CMAKE_CUDA_COMPILER_LAUNCHER
"
${
CCACHE_PROGRAM
}
"
CACHE STRING
"CUDA compiler launcher"
)
else
()
find_program
(
SCCACHE_PROGRAM sccache
)
if
(
SCCACHE_PROGRAM
)
message
(
STATUS
"Using sccache:
${
SCCACHE_PROGRAM
}
"
)
set
(
CMAKE_C_COMPILER_LAUNCHER
"
${
SCCACHE_PROGRAM
}
"
CACHE STRING
"C compiler launcher"
)
set
(
CMAKE_CXX_COMPILER_LAUNCHER
"
${
SCCACHE_PROGRAM
}
"
CACHE STRING
"CXX compiler launcher"
)
set
(
CMAKE_CUDA_COMPILER_LAUNCHER
"
${
SCCACHE_PROGRAM
}
"
CACHE STRING
"CUDA compiler launcher"
)
endif
()
endif
()
# Configs
set
(
USE_CUDA OFF
)
set
(
USE_ROCM OFF
)
set
(
USE_METAL OFF
)
set
(
TILELANG_BACKENDS CUDA ROCM METAL
)
set
(
TILELANG_BACKEND_DOC_CUDA
"Enable CUDA backend (ON/OFF/or CUDA SDK path)"
)
set
(
TILELANG_BACKEND_DOC_ROCM
"Enable ROCm backend (ON/OFF/or ROCm SDK path)"
)
set
(
TILELANG_BACKEND_DOC_METAL
"Enable Metal backend"
)
# TVM's config.cmake redefines USE_* options later, so we cache the user's choice
# (including explicit -DUSE_XXX arguments) before we include TVM and restore it
# afterwards.
macro
(
tilelang_define_backend_option BACKEND
)
set
(
_backend_var
"USE_
${
BACKEND
}
"
)
set
(
_doc
"
${
TILELANG_BACKEND_DOC_
${
BACKEND
}}
"
)
set
(
_user_override_var
"TILELANG_USER_OVERRIDE_
${
_backend_var
}
"
)
set
(
_user_override OFF
)
if
(
DEFINED
${
_user_override_var
}
)
set
(
_user_override
"
${${
_user_override_var
}}
"
)
endif
()
if
(
DEFINED CACHE{
${
_backend_var
}
}
)
get_property
(
_cache_type CACHE
${
_backend_var
}
PROPERTY TYPE
)
if
(
_cache_type STREQUAL
"UNINITIALIZED"
)
set
(
_user_override ON
)
endif
()
endif
()
set
(
_default OFF
)
if
(
DEFINED
${
_backend_var
}
)
set
(
_default
"
${${
_backend_var
}}
"
)
endif
()
option
(
${
_backend_var
}
"
${
_doc
}
"
"
${
_default
}
"
)
# Remember if the user explicitly set this option so that later logic
# won't auto-toggle backends they configured on the command line.
set
(
${
_user_override_var
}
${
_user_override
}
CACHE INTERNAL
"User explicitly set
${
_backend_var
}
during configuration"
FORCE
)
set
(
TILELANG_OPTION_
${
_backend_var
}
"
${${
_backend_var
}}
"
)
endmacro
()
foreach
(
BACKEND IN LISTS TILELANG_BACKENDS
)
tilelang_define_backend_option
(
${
BACKEND
}
)
endforeach
()
set
(
PREBUILD_CYTHON ON
)
# Configs end
...
...
@@ -55,6 +119,14 @@ if(EXISTS ${TVM_SOURCE}/cmake/config.cmake)
else
()
message
(
FATAL_ERROR
"Nor tvm provided or submodule checkout-ed."
)
endif
()
# Re-apply TileLang's preferred backend settings after TVM's config may have
# overridden the USE_* cache entries.
foreach
(
BACKEND IN LISTS TILELANG_BACKENDS
)
set
(
_backend_var
"USE_
${
BACKEND
}
"
)
set
(
_doc
"
${
TILELANG_BACKEND_DOC_
${
BACKEND
}}
"
)
set
(
${
_backend_var
}
${
TILELANG_OPTION_
${
_backend_var
}}
CACHE STRING
"
${
_doc
}
"
FORCE
)
set
(
${
_backend_var
}
${
TILELANG_OPTION_
${
_backend_var
}}
)
endforeach
()
# Include directories for TileLang
set
(
TILE_LANG_INCLUDES
${
TVM_INCLUDES
}
)
...
...
@@ -68,29 +140,39 @@ file(GLOB TILE_LANG_SRCS
src/target/utils.cc
src/target/codegen_cpp.cc
src/target/rt_mod_cpp.cc
# webgpu doesn't have system dependency
src/target/codegen_webgpu.cc
# intrin_rule doesn't have system dependency
src/target/intrin_rule*.cc
)
# Backend-specific checks and configs
if
(
$ENV{USE_METAL}
)
set
(
USE_METAL ON
)
elseif
(
APPLE
)
message
(
STATUS
"Enable Metal support by default."
)
set
(
USE_METAL ON
)
elseif
(
$ENV{USE_ROCM}
)
set
(
USE_ROCM ON
)
else
()
if
(
$ENV{USE_CUDA}
)
set
(
USE_CUDA ON
)
elseif
(
DEFINED ENV{USE_CUDA} AND NOT $ENV{USE_CUDA}
)
# Build CPU-only when we explicitly disable CUDA
set
(
USE_CUDA OFF
)
# Track if the user explicitly selected a backend via cache options.
set
(
TILELANG_BACKEND_USER_SELECTED OFF
)
foreach
(
BACKEND IN LISTS TILELANG_BACKENDS
)
set
(
_backend_var
"USE_
${
BACKEND
}
"
)
set
(
_override_var
"TILELANG_USER_OVERRIDE_
${
_backend_var
}
"
)
if
(
${
_backend_var
}
OR
${
_override_var
}
)
set
(
TILELANG_BACKEND_USER_SELECTED ON
)
endif
()
endforeach
()
# Only auto-select a backend when the user didn't specify one explicitly.
if
(
NOT TILELANG_BACKEND_USER_SELECTED
)
if
(
$ENV{USE_METAL}
)
set
(
USE_METAL ON
)
elseif
(
APPLE
)
message
(
STATUS
"Enable Metal support by default."
)
set
(
USE_METAL ON
)
elseif
(
$ENV{USE_ROCM}
)
set
(
USE_ROCM ON
)
else
()
message
(
STATUS
"Enable CUDA support by default."
)
set
(
USE_CUDA ON
)
if
(
$ENV{USE_CUDA}
)
set
(
USE_CUDA ON
)
elseif
(
DEFINED ENV{USE_CUDA} AND NOT $ENV{USE_CUDA}
)
# Build CPU-only when we explicitly disable CUDA
set
(
USE_CUDA OFF
)
else
()
message
(
STATUS
"Enable CUDA support by default."
)
set
(
USE_CUDA ON
)
endif
()
endif
()
endif
()
...
...
@@ -104,7 +186,7 @@ if(USE_METAL)
elseif
(
USE_ROCM
)
set
(
CMAKE_HIP_STANDARD 17
)
include
(
${
TVM_SOURCE
}
/cmake/utils/FindROCM.cmake
)
find_rocm
(
$
ENV
{USE_ROCM}
)
find_rocm
(
${
USE_ROCM
}
)
add_compile_definitions
(
__HIP_PLATFORM_AMD__ __HIP_PLATFORM_HCC__=1
)
file
(
GLOB TILE_LANG_HIP_SRCS
...
...
@@ -148,12 +230,8 @@ target_include_directories(tilelang_objs PRIVATE ${TILE_LANG_INCLUDES})
add_library
(
tilelang SHARED $<TARGET_OBJECTS:tilelang_objs>
)
add_library
(
tilelang_module SHARED $<TARGET_OBJECTS:tilelang_objs>
)
target_link_libraries
(
tilelang PUBLIC tvm_runtime
)
target_link_libraries
(
tilelang PUBLIC tvm_runtime
tvm
)
target_link_libraries
(
tilelang_module PUBLIC tvm
)
if
(
APPLE
)
# FIXME: libtilelang should only link against tvm runtime
target_link_libraries
(
tilelang PUBLIC tvm
)
endif
()
# Build cython extension
find_package
(
Python REQUIRED COMPONENTS Interpreter Development.Module
${
SKBUILD_SABI_COMPONENT
}
)
...
...
@@ -181,18 +259,18 @@ install(TARGETS tilelang_cython_wrapper
# let libtilelang to search tvm/tvm_runtime in same dir
if
(
APPLE
)
set_target_properties
(
tilelang PROPERTIES INSTALL_RPATH
"@loader_path"
)
set_target_properties
(
tilelang_module PROPERTIES INSTALL_RPATH
"@loader_path"
)
else
()
set_target_properties
(
tilelang PROPERTIES INSTALL_RPATH
"
\$
ORIGIN"
)
set_target_properties
(
tilelang_module PROPERTIES INSTALL_RPATH
"
\$
ORIGIN"
)
set_target_properties
(
tilelang PROPERTIES INSTALL_RPATH
"@loader_path;@loader_path/../../tvm_ffi/lib"
)
set_target_properties
(
tilelang_module PROPERTIES INSTALL_RPATH
"@loader_path;@loader_path/../../tvm_ffi/lib"
)
set_target_properties
(
tvm PROPERTIES INSTALL_RPATH
"@loader_path;@loader_path/../../tvm_ffi/lib"
)
set_target_properties
(
tvm_runtime PROPERTIES INSTALL_RPATH
"@loader_path;@loader_path/../../tvm_ffi/lib"
)
elseif
(
UNIX
)
set_target_properties
(
tilelang PROPERTIES INSTALL_RPATH
"
\$
ORIGIN:
\$
ORIGIN/../../tvm_ffi/lib"
)
set_target_properties
(
tilelang_module PROPERTIES INSTALL_RPATH
"
\$
ORIGIN:
\$
ORIGIN/../../tvm_ffi/lib"
)
set_target_properties
(
tvm PROPERTIES INSTALL_RPATH
"
\$
ORIGIN:
\$
ORIGIN/../../tvm_ffi/lib"
)
set_target_properties
(
tvm_runtime PROPERTIES INSTALL_RPATH
"
\$
ORIGIN:
\$
ORIGIN/../../tvm_ffi/lib"
)
endif
()
install
(
TARGETS tvm tvm_runtime tilelang_module tilelang LIBRARY DESTINATION tilelang/lib
)
# Copy tvm cython ext for wheels
# TODO: not necessary for editable builds
if
(
TVM_BUILD_FROM_SOURCE
)
add_dependencies
(
tilelang tvm_cython
)
install
(
FILES
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/3rdparty/tvm/python/tvm/ffi/core.abi3.so"
DESTINATION tilelang/3rdparty/tvm/python/tvm/ffi/
)
endif
()
install
(
TARGETS tvm tvm_runtime tilelang_module tilelang
LIBRARY DESTINATION tilelang/lib
)
MANIFEST.in
deleted
100644 → 0
View file @
8f4628e0
# Reference: https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html
# Include licenses
include VERSION
include LICENSE
include THIRDPARTYNOTICES.txt
# Version and dependency files
include version_provider.py
include requirements*.txt
include tilelang/jit/adapter/cython/cython_wrapper.pyx
# Include source files in SDist
include CMakeLists.txt
graft src
graft cmake
graft 3rdparty
# Include test suites in SDist
graft testing
graft examples
global-exclude .coverage .coverage.* coverage.xml coverage-*.xml coverage.*.xml
global-exclude .junit .junit.* junit.xml junit-*.xml junit.*.xml
# Exclude unneeded files and directories
prune .git
prune .github
prune */.git
prune */.github
prune 3rdparty/clang*
prune 3rdparty/llvm*
# Prune compiled files
prune */__pycache__
global-exclude *~ *.py[cod] *.so *.a *.dylib *.pxd *.dll *.lib *.o *.obj
README.md
View file @
bbbf4207
...
...
@@ -13,6 +13,7 @@ Tile Language (**tile-lang**) is a concise domain-specific language designed to
<img
src=
./images/MatmulExample.png
/>
## Latest News
-
10/30/2025 📦: We have released v0.1.6.post2, which is the last version compatible with Python 3.8.
-
10/07/2025 🍎: Added Apple Metal Device support, check out
[
Pull Request #799
](
https://github.com/tile-ai/tilelang/pull/799
)
for details.
-
09/29/2025 🎉: Thrilled to announce that AscendC and AscendNPU IR backends targeting Huawei Ascend chips are now supported!
Check out the preview here:
...
...
VERSION
View file @
bbbf4207
0.1.6.post
1
0.1.6.post
2
cmake/load_tvm.cmake
View file @
bbbf4207
...
...
@@ -11,8 +11,17 @@ endif()
set
(
TVM_INCLUDES
${
TVM_SOURCE
}
/include
${
TVM_SOURCE
}
/ffi/include
${
TVM_SOURCE
}
/src
${
TVM_SOURCE
}
/3rdparty/dlpack/include
${
TVM_SOURCE
}
/3rdparty/dmlc-core/include
)
if
(
EXISTS
${
TVM_SOURCE
}
/ffi/include
)
list
(
APPEND TVM_INCLUDES
${
TVM_SOURCE
}
/ffi/include
)
elseif
(
EXISTS
${
TVM_SOURCE
}
/3rdparty/tvm-ffi/include
)
list
(
APPEND TVM_INCLUDES
${
TVM_SOURCE
}
/3rdparty/tvm-ffi/include
)
endif
()
if
(
EXISTS
${
TVM_SOURCE
}
/3rdparty/tvm-ffi/3rdparty/dlpack/include
)
list
(
APPEND TVM_INCLUDES
${
TVM_SOURCE
}
/3rdparty/tvm-ffi/3rdparty/dlpack/include
)
endif
()
docker/Dockerfile.cu118
View file @
bbbf4207
...
...
@@ -23,6 +23,6 @@ RUN conda install pip cmake && conda install -c conda-forge libstdcxx-ng=12 && c
RUN apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev
RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main TileLang \
&& cd TileLang &&
./install_cuda.sh
&& cd TileLang &&
USE_CUDA=1 pip install -e . -v
CMD bash
docker/Dockerfile.cu120
View file @
bbbf4207
...
...
@@ -23,6 +23,6 @@ RUN conda install pip cmake && conda install -c conda-forge libstdcxx-ng=12 && c
RUN apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev
RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main TileLang \
&& cd TileLang &&
./install_cuda.sh
&& cd TileLang &&
USE_CUDA=1 pip install -e . -v
CMD bash
docker/Dockerfile.cu121
View file @
bbbf4207
...
...
@@ -23,6 +23,6 @@ RUN conda install pip cmake && conda install -c conda-forge libstdcxx-ng=12 && c
RUN apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev
RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main TileLang \
&& cd TileLang &&
./install_cuda.sh
&& cd TileLang &&
USE_CUDA=1 pip install -e . -v
CMD bash
docker/Dockerfile.cu123
View file @
bbbf4207
...
...
@@ -23,6 +23,6 @@ RUN conda install pip cmake && conda install -c conda-forge libstdcxx-ng=12 && c
RUN apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev
RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main TileLang \
&& cd TileLang &&
./install_cuda.sh
&& cd TileLang &&
USE_CUDA=1 pip install -e . -v
CMD bash
docker/Dockerfile.cu124
View file @
bbbf4207
...
...
@@ -23,6 +23,6 @@ RUN conda install pip cmake && conda install -c conda-forge libstdcxx-ng=12 && c
RUN apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev
RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main TileLang \
&& cd TileLang &&
./install_cuda.sh
&& cd TileLang &&
USE_CUDA=1 pip install -e . -v
CMD bash
docker/Dockerfile.cu125
View file @
bbbf4207
...
...
@@ -23,6 +23,6 @@ RUN conda install pip cmake && conda install -c conda-forge libstdcxx-ng=12 && c
RUN apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev
RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main TileLang \
&& cd TileLang &&
./install_cuda.sh
&& cd TileLang &&
USE_CUDA=1 pip install -e . -v
CMD bash
docker/Dockerfile.cu126
View file @
bbbf4207
...
...
@@ -23,6 +23,6 @@ RUN conda install pip cmake && conda install -c conda-forge libstdcxx-ng=12 && c
RUN apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev
RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main TileLang \
&& cd TileLang &&
./install_cuda.sh
&& cd TileLang &&
USE_CUDA=1 pip install -e . -v
CMD bash
Prev
1
2
3
4
5
…
15
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment