-
Notifications
You must be signed in to change notification settings - Fork 447
[Release] Add build for python 3.14t #1805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Hi! Thank you for contributing to the TileLang project. Please remember to run We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀 |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
📝 WalkthroughWalkthroughExpanded CI/build configuration and cibuildwheel settings: added Python 3.14/abi3 entries to the Actions matrix, introduced a TEST_PYTHON_VERSION mapping and propagated it to setup/test steps, added abi3 auditing, adjusted cibuildwheel repair commands and overrides, and updated several pyproject dependency constraints. Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Actions
participant Runner as Job Runner (matrix.python-version)
participant CIBW as cibuildwheel
participant Wheel as Wheel artifacts
participant TestEnv as Test venv (TEST_PYTHON_VERSION)
participant AbiAudit as abi3audit
GH->>Runner: start job with matrix.python-version
Runner->>CIBW: build wheels (uses matrix.python-version)
CIBW->>Wheel: produce wheel artifacts
GH->>Runner: "Test built wheels" step
Runner->>TestEnv: create venv using TEST_PYTHON_VERSION
alt wheel is abi3
Runner->>AbiAudit: run abi3audit on Wheel
AbiAudit-->>Runner: audit result
end
Runner->>TestEnv: pre-install dependencies (before-test, e.g. pip install torch)
Runner->>TestEnv: install Wheel and run tests
TestEnv-->>GH: report test results
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pyproject.toml (1)
72-72:⚠️ Potential issue | 🔴 CriticalRemove or override
wheel.py-api = "cp38"for free-threaded Python builds.The current configuration builds for Python 3.14t (free-threaded) in
dist.yml, butwheel.py-api = "cp38"attempts to create stable ABI (abi3) wheels. Free-threaded CPython does not support the stable ABI—even in Python 3.14t—and will fail to useabi3-tagged wheels. PEP 803 (which would add stable ABI support for free-threaded) is still in Draft status and targets Python 3.15+.Free-threaded builds must use version-specific wheel tags (e.g.,
cp314t-cp314t-*) instead. Either unsetwheel.py-apifor 3.14t builds or add a cibuildwheel override that disables it whencp314tis selected. Without this, wheels built on Python 3.14t will be incorrectly tagged and incompatible with the free-threaded interpreter.
🤖 Fix all issues with AI agents
In @.github/workflows/dist.yml:
- Around line 124-127: The test step fails for 3.14t wheels because the venv is
hardcoded to --python=3.12; update the "Test built wheels" job so the virtualenv
uses the matrix value (matrix.python-version) instead of 3.12, e.g. replace the
fixed --python=3.12 invocation that creates the test venv with a dynamic
reference to the matrix entry used to build the wheel (so the uv pip install -v
"${WHEEL}" runs in a matching interpreter for entries like "3.14t" and still
works for "3.9"/abi3).
In `@pyproject.toml`:
- Around line 277-281: The conditional in the repair-wheel-command under
[[tool.cibuildwheel.overrides]] is using invalid shell syntax (`if [ echo ... |
grep -q ... ]`); update the command to use a valid shell conditional such as
removing the brackets and using a pipeline: `if echo "{wheel}" | grep -q "abi3";
then pipx run abi3audit --verbose --strict {wheel}; fi` (or alternatively use a
shell pattern test like `if [[ "{wheel}" == *abi3* ]]; then ...; fi`) so the
`repair-wheel-command` executes correctly for abi3 wheels.
c7ec73b to
4884899
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@pyproject.toml`:
- Around line 277-282: Replace the opaque "# FIXME: 1" comment in the
cibuildwheel override block with a clear explanation or a link to the tracking
issue: mention the actual problem (e.g., cp315-abi3 / free-threaded wheel
compatibility) and reference the external issue (for example "see
apache/tvm-ffi#433") so future readers understand why the conditional
repair-wheel-command exists; update the comment immediately above the
[[tool.cibuildwheel.overrides]] block or next to repair-wheel-command to read a
short human-readable description and include the issue URL or number.
e742c65 to
f66c117
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds CI/build support for producing wheels targeting the Python 3.14 free-threaded (“3.14t”) ABI, and refactors wheel repair/testing steps to align with the selected matrix Python version.
Changes:
- Extend the dist workflow build matrix to include Python
3.14talongside3.9. - Update wheel testing to create the test venv using the matrix-provided Python version, and run
abi3auditonly for wheels whose filename indicates an ABI3 build. - Simplify cibuildwheel repair commands in
pyproject.tomlto a single repair command per platform.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pyproject.toml |
Simplifies repair-wheel-command on Linux/macOS to a single command (auditwheel/delocate). |
.github/workflows/dist.yml |
Adds 3.14t to the wheel build matrix and adjusts post-build testing to use matrix Python + conditional abi3audit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/dist.yml
Outdated
| python-version: ${{ matrix.python-version }} | ||
| activate-environment: true | ||
|
|
||
| - name: Test built wheels | ||
| run: | | ||
| for WHEEL in wheelhouse/*.whl; do | ||
| echo "Testing wheel: ${WHEEL}" | ||
| if [[ "${WHEEL}" == *"abi3"* ]]; then | ||
| pipx run abi3audit --verbose --strict "${WHEEL}" | ||
| fi | ||
| ( | ||
| set -e | ||
| uv venv --python=3.12 test-venv | ||
| uv venv --python=${{ matrix.python-version }} test-venv | ||
| source test-venv/bin/activate |
Copilot
AI
Feb 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching the wheel test environment from a fixed modern CPython (3.12) to ${{ matrix.python-version }} reduces validation for the non-free-threaded/ABI3 wheel: the 3.9 build will now only be imported/tested under Python 3.9, so issues that only surface on newer runtimes (e.g., 3.12/3.13) may slip through. Consider keeping a stable “latest” test interpreter for the regular (non-t) wheel (or adding a small test-python-version matrix), while still testing the 3.14t wheel under 3.14t.
207b5cd to
f66c117
Compare
Co-authored-by: Xuehai Pan <[email protected]>
b4b063f to
11704a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/dist.yml (1)
216-221:⚠️ Potential issue | 🟡 MinorTorch install may fail for
3.14ton nightly CUDA targets.When
UV_INDEXcontains/nightly/, the step triesuv pip install --prerelease=allow -v torch. If PyTorch doesn't publish free-threaded 3.14 wheels yet, this will fail those matrix entries. Sincefail-fast: falseis set, other builds won't be blocked, but you may want to gate this install (or the entire torch-dependent test) on the Python version if you want green CI for the non-3.14t entries while 3.14t support matures.
5984eaa to
e935ac0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@pyproject.toml`:
- Line 35: The PEP 508 marker "torch-c-dlpack-ext; python_version != '3.14t'" is
invalid because python_version only exposes major.minor (e.g., "3.14"); remove
the "'3.14t'" marker and either (A) replace it with "python_version != '3.14'"
if you intend to exclude all CPython 3.14, or (B) remove the conditional from
pyproject.toml and implement a build-time check (e.g., in your build/install
script or setup logic) that inspects sys.abiflags or sys.implementation to
detect the free-threaded 't' ABI and conditionally add "torch-c-dlpack-ext";
update the package-selection code accordingly.
e935ac0 to
b13969a
Compare
d37ee2b to
0048c87
Compare
|
@LeiWang1999 do you think we should build extra wheel for different python ABIs or just let user to compile from source? Currently for python 3.14t compiling from source is not feasible because |
|
@oraluben we can currently let user build it from source on my opinion if just for python3.14t. |
|
LGTM, and feel free to let it in if you think this is ready. |
Makes sense. I disable 3.14t job and keep the code changes for possible future usage. |
We need extra wheel for python 3.14 threadsafe version.
Summary by CodeRabbit