Skip to content

Commit ed8105b

Browse files
luhenryclaude
authored andcommitted
tilelang: Add 0.1.14 patches
The 0.1.13 patches apply unchanged to 0.1.14; the build applies patches/tilelang/<version>/ for every version it builds.
1 parent 6fc30e0 commit ed8105b

2 files changed

Lines changed: 78 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From eb4ecb56206313a908666299df963cbc85abd9b9 Mon Sep 17 00:00:00 2001
2+
From: Ludovic Henry <git@ludovic.dev>
3+
Date: Thu, 10 Sep 2026 14:43:22 +0000
4+
Subject: [PATCH] exclude torch-c-dlpack-ext from the riscv64 dependency set
5+
6+
Upstream-Status: Inappropriate [riscv64 CI-specific: drops a torch C-extension accelerator with no riscv64 wheel anywhere; not something upstream would want for its general audience]
7+
8+
torch-c-dlpack-ext is an unconditional dependency for python_version <
9+
'3.14', but it ships no riscv64 wheel on PyPI or pypi.riseproject.dev, so
10+
`pip install` of the riscv64 wheel fails to resolve on any interpreter
11+
below 3.14. Upstream's own comment above the dependency says it is a soft
12+
accelerator, not a hard requirement: "Without it, TVM FFI may require JIT
13+
compilation on first import." Gate it off on riscv64 with an extra
14+
platform_machine marker so the rest of the dependency set (all of which do
15+
have riscv64 wheels) resolves normally; every other architecture keeps the
16+
exact same dependency.
17+
18+
Signed-off-by: Ludovic Henry <git@ludovic.dev>
19+
---
20+
pyproject.toml | 2 +-
21+
1 file changed, 1 insertion(+), 1 deletion(-)
22+
23+
diff --git a/pyproject.toml b/pyproject.toml
24+
index 702ab8dd..59fa41af 100644
25+
--- a/pyproject.toml
26+
+++ b/pyproject.toml
27+
@@ -30,7 +30,7 @@ dependencies = [
28+
"apache-tvm-ffi>=0.1.11,<0.1.13",
29+
# torch-c-dlpack-ext provides prebuilt torch extensions.
30+
# Without it, TVM FFI may require JIT compilation on first import.
31+
- "torch-c-dlpack-ext; python_version < '3.14'",
32+
+ "torch-c-dlpack-ext; python_version < '3.14' and platform_machine != 'riscv64'",
33+
"cloudpickle",
34+
"ml-dtypes",
35+
"numpy>=1.23.5",
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
From c98c23b9ffc27de07e9e0a0bfc3c9190161616bf Mon Sep 17 00:00:00 2001
2+
From: Ludovic Henry <git@ludovic.dev>
3+
Date: Thu, 10 Sep 2026 20:00:00 +0200
4+
Subject: [PATCH] cap the cython build requirement below 3.3
5+
6+
Upstream-Status: To upstream [not submitted: cannot open issues/PRs against tile-ai/tilelang from this environment; cross-platform bug, not riscv64-specific]
7+
8+
build-system.requires pins "cython>=3.1.0" with no upper bound. Cython
9+
3.3.0 (Cython/Utility/ModuleSetupCode.c) added a hard #error when a
10+
Limited API build targets below Python 3.9:
11+
12+
#if Py_LIMITED_API < 0x03090000
13+
#error "Cython 3.3 requires the Python Limited API version to be
14+
3.9 or greater."
15+
16+
tilelang's own scikit-build config sets `wheel.py-api = "cp38"`, so
17+
SKBUILD_SABI_VERSION is 3.8 and tilelang_cython_wrapper's generated
18+
.cpp fails to compile once an unbounded resolve picks up Cython
19+
3.3.0 (the current latest release on PyPI). This is not
20+
architecture-specific: any build resolving cython>=3.3 against the
21+
existing cp38 Limited API target breaks the same way. Cap it below
22+
3.3 so the resolver keeps picking a Cython release that predates this
23+
check, matching the Cython version tilelang's own CI has actually
24+
been built and tested against.
25+
26+
Signed-off-by: Ludovic Henry <git@ludovic.dev>
27+
---
28+
pyproject.toml | 2 +-
29+
1 file changed, 1 insertion(+), 1 deletion(-)
30+
31+
diff --git a/pyproject.toml b/pyproject.toml
32+
index 59fa41af..9844f757 100644
33+
--- a/pyproject.toml
34+
+++ b/pyproject.toml
35+
@@ -74,7 +74,7 @@ torch = [
36+
37+
[build-system]
38+
requires = [
39+
- "cython>=3.1.0",
40+
+ "cython>=3.1.0,<3.3",
41+
"scikit-build-core",
42+
"z3-solver>=4.13.0,<4.15.5",
43+
# Not for auditwheel, explicitly add patchelf for repairing libz3.so.

0 commit comments

Comments
 (0)