Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
debug/
build/
*dist/
dist*/
wheelhouse/
__pycache__
nnfusion.tar.gz
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ​Ascend​NPU IR​​ backends targeting Huawei Ascend chips are now supported!
Check out the preview here:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.6.post1
0.1.6.post2
71 changes: 66 additions & 5 deletions maint/scripts/docker_local_distribute.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,70 @@
set -eux
#!/usr/bin/env bash
set -euxo pipefail

# Get the CUDA version from the command line
IMAGE="tilelang-builder:manylinux"
docker build . -f "$(dirname "${BASH_SOURCE[0]}")/pypi.manylinux.Dockerfile" --tag ${IMAGE}

script="sh maint/scripts/local_distribution.sh"
HOST_UNAME=$(uname -m)
case "$HOST_UNAME" in
x86_64) TARGETARCH=amd64 ;;
aarch64|arm64) TARGETARCH=arm64 ;;
*) echo "Unsupported architecture: $HOST_UNAME" >&2; exit 1 ;;
esac

docker run --rm -v $(pwd):/tilelang ${IMAGE} /bin/bash -c "$script"
if docker buildx version >/dev/null 2>&1; then
if docker info >/dev/null 2>&1; then
docker run --rm --privileged tonistiigi/binfmt --install amd64,arm64 >/dev/null 2>&1 || true
fi

if ! docker buildx inspect multi >/dev/null 2>&1; then
docker buildx create --name multi --driver docker-container --use >/dev/null 2>&1 || true
else
docker buildx use multi >/dev/null 2>&1 || true
fi
docker buildx inspect --bootstrap >/dev/null 2>&1 || true

for ARCH in amd64 arm64; do
TAG_PLATFORM="linux/${ARCH}"
TAG_IMAGE="${IMAGE}-${ARCH}"

docker buildx build \
--platform "${TAG_PLATFORM}" \
--build-arg TARGETARCH="${ARCH}" \
-f "$(dirname "${BASH_SOURCE[0]}")/pypi.manylinux.Dockerfile" \
-t "${TAG_IMAGE}" \
--load \
.

script="sh maint/scripts/local_distribution.sh"
docker run --rm \
--platform "${TAG_PLATFORM}" \
-v "$(pwd):/tilelang" \
"${TAG_IMAGE}" \
/bin/bash -lc "$script"

if [ -d dist ]; then
mv -f dist "dist-local-${ARCH}"
fi
done

else
echo "docker buildx not found; building only host arch: ${TARGETARCH}" >&2
TAG_IMAGE="${IMAGE}-${TARGETARCH}"
TAG_PLATFORM="linux/${TARGETARCH}"

docker build \
--build-arg TARGETARCH="$TARGETARCH" \
-f "$(dirname "${BASH_SOURCE[0]}")/pypi.manylinux.Dockerfile" \
-t "${TAG_IMAGE}" \
.

script="sh maint/scripts/local_distribution.sh"
docker run --rm \
--platform "${TAG_PLATFORM}" \
-v "$(pwd):/tilelang" \
"${TAG_IMAGE}" \
/bin/bash -lc "$script"

if [ -d dist ]; then
mv -f dist "dist-${TARGETARCH}"
fi
fi
71 changes: 66 additions & 5 deletions maint/scripts/docker_pypi_distribute.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,70 @@
set -eux
#!/usr/bin/env bash
set -euxo pipefail

# Get the CUDA version from the command line
IMAGE="tilelang-builder:manylinux"
docker build . -f "$(dirname "${BASH_SOURCE[0]}")/pypi.manylinux.Dockerfile" --tag ${IMAGE}

script="sh maint/scripts/pypi_distribution.sh"
HOST_UNAME=$(uname -m)
case "$HOST_UNAME" in
x86_64) TARGETARCH=amd64 ;;
aarch64|arm64) TARGETARCH=arm64 ;;
*) echo "Unsupported architecture: $HOST_UNAME" >&2; exit 1 ;;
esac

docker run --rm -v $(pwd):/tilelang -w /tilelang ${IMAGE} /bin/bash -c "$script"
if docker buildx version >/dev/null 2>&1; then
if docker info >/dev/null 2>&1; then
docker run --rm --privileged tonistiigi/binfmt --install amd64,arm64 >/dev/null 2>&1 || true
fi

if ! docker buildx inspect multi >/dev/null 2>&1; then
docker buildx create --name multi --driver docker-container --use >/dev/null 2>&1 || true
else
docker buildx use multi >/dev/null 2>&1 || true
fi
docker buildx inspect --bootstrap >/dev/null 2>&1 || true

for ARCH in amd64 arm64; do
TAG_PLATFORM="linux/${ARCH}"
TAG_IMAGE="${IMAGE}-${ARCH}"

docker buildx build \
--platform "${TAG_PLATFORM}" \
--build-arg TARGETARCH="${ARCH}" \
-f "$(dirname "${BASH_SOURCE[0]}")/pypi.manylinux.Dockerfile" \
-t "${TAG_IMAGE}" \
--load \
.

script="sh maint/scripts/pypi_distribution.sh"
docker run --rm \
--platform "${TAG_PLATFORM}" \
-v "$(pwd):/tilelang" \
"${TAG_IMAGE}" \
/bin/bash -lc "$script"

if [ -d dist ]; then
mv -f dist "dist-pypi-${ARCH}"
fi
done

else
echo "docker buildx not found; building only host arch: ${TARGETARCH}" >&2
TAG_IMAGE="${IMAGE}-${TARGETARCH}"
TAG_PLATFORM="linux/${TARGETARCH}"

docker build \
--build-arg TARGETARCH="$TARGETARCH" \
-f "$(dirname "${BASH_SOURCE[0]}")/pypi.manylinux.Dockerfile" \
-t "${TAG_IMAGE}" \
.

script="sh maint/scripts/pypi_distribution.sh"
docker run --rm \
--platform "${TAG_PLATFORM}" \
-v "$(pwd):/tilelang" \
"${TAG_IMAGE}" \
/bin/bash -lc "$script"

if [ -d dist ]; then
mv -f dist "dist-${TARGETARCH}"
fi
fi
6 changes: 6 additions & 0 deletions maint/scripts/pypi.manylinux.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ARG TARGETARCH
FROM pytorch/manylinux2_28-builder:cuda12.1 AS builder_amd64
ENV CUDA_VERSION=12.1 \
AUDITWHEEL_PLAT=manylinux_2_28_x86_64
Expand All @@ -6,12 +7,17 @@ RUN pip3 install uv
FROM pytorch/manylinuxaarch64-builder:cuda12.8 AS builder_arm64
ENV CUDA_VERSION=12.8 \
AUDITWHEEL_PLAT=manylinux_2_28_aarch64
RUN /opt/python/cp312-cp312/bin/pip install uv

FROM builder_${TARGETARCH}

ENV DEBIAN_FRONTEND=noninteractive \
TZ=Etc/UTC

ENV PATH="/usr/local/cuda/bin:${PATH}"

ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"

RUN set -eux; \
uv venv -p 3.12 --seed /venv; \
git config --global --add safe.directory '/tilelang'
Expand Down
2 changes: 1 addition & 1 deletion maint/scripts/pypi_distribution.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -eux

rm -rf dist
rm -rf dist raw_dist

python -mpip install -U pip
python -mpip install -U build wheel auditwheel patchelf
Expand Down
12 changes: 11 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,17 @@ tilelang = "tilelang"
"tilelang/src" = "src"
# NOTE: The mapping below places the contents of '3rdparty' inside 'tilelang/3rdparty' in the wheel.
# This is necessary to find TVM shared libraries at runtime.
"tilelang/3rdparty" = "3rdparty"
# Restrict 3rdparty contents in wheel to the same allowlist as sdist
# TVM
"tilelang/3rdparty/tvm/src" = "3rdparty/tvm/src"
"tilelang/3rdparty/tvm/python" = "3rdparty/tvm/python"
"tilelang/3rdparty/tvm/version.py" = "3rdparty/tvm/version.py"
# CUTLASS
"tilelang/3rdparty/cutlass/include" = "3rdparty/cutlass/include"
"tilelang/3rdparty/cutlass/tools" = "3rdparty/cutlass/tools"
# Composable Kernel
"tilelang/3rdparty/composable_kernel/include" = "3rdparty/composable_kernel/include"
"tilelang/3rdparty/composable_kernel/library" = "3rdparty/composable_kernel/library"

[tool.yapf]
based_on_style = "yapf"
Expand Down
Loading