|
| 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