Skip to content

Conversation

@oraluben
Copy link
Collaborator

@oraluben oraluben commented Feb 7, 2026

We need extra wheel for python 3.14 threadsafe version.

Summary by CodeRabbit

  • Chores
    • Broadened Python ABI support (adds 3.14t, maps 3.9→test 3.12 and 3.14t→test 3.14t) and moved CI to per-version test selection.
    • Improved CI caching to include Python version and adjusted test setup to use matrix-driven test Python.
    • Unified wheel-repair commands, added platform-specific pre-test install of a large dependency, and added abi3 auditing before tests.
    • Adjusted dependency constraints and made one native-extension dependency conditional for newer Python.

@oraluben oraluben requested a review from XuehaiPan February 7, 2026 07:25
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

👋 Hi! Thank you for contributing to the TileLang project.

Please remember to run pre-commit run --all-files in the root directory of the project to ensure your changes are properly linted and formatted. This will help ensure your contribution passes the format check.

We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 7, 2026

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.
📝 Walkthrough

Walkthrough

Expanded 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

Cohort / File(s) Summary
GitHub Actions workflow
.github/workflows/dist.yml
Expanded wheel matrix (added Python 3.14 and abi3 entries), added TEST_PYTHON_VERSION mapping and per-ABI test mapping, switched setup/test steps to use matrix.test-python-version, included matrix.python-version in ccache keys, and run abi3 auditing only for abi3 wheels.
cibuildwheel / build config
pyproject.toml
Changed repair-wheel-command for Linux/macOS from lists to single strings, added [tool.cibuildwheel.overrides] selecting *linux*x86_64* with before-test = ["pip install torch --no-cache-dir"], and adjusted cibuildwheel-related CI hooks.
Dependencies / pyproject
pyproject.toml
Relaxed apache-tvm-ffi lower bound to >=0.1.2, made torch-c-dlpack-ext conditional on Python version (; python_version < '3.14'), and constrained z3-solver / build-system z3 bounds (>=4.13.0, !=4.15.5.0 / <4.15.5 for older Python).

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • LeiWang1999
  • XuehaiPan

Poem

🐇 I nibbled YAML, hopped through TOML too,
I added a row and set the test venv true,
On Linux I planted torch before the race,
Abi3 gets checked in its special place,
CI carrots ready — wheels roll into view.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the main objective: adding a build for Python 3.14t, which is supported by changes to both .github/workflows/dist.yml (introducing Python 3.14t ABI) and pyproject.toml (Python version constraints).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 | 🔴 Critical

Remove or override wheel.py-api = "cp38" for free-threaded Python builds.

The current configuration builds for Python 3.14t (free-threaded) in dist.yml, but wheel.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 use abi3-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 unset wheel.py-api for 3.14t builds or add a cibuildwheel override that disables it when cp314t is 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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.

XuehaiPan
XuehaiPan previously approved these changes Feb 8, 2026
Copy link
Contributor

Copilot AI left a 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.14t alongside 3.9.
  • Update wheel testing to create the test venv using the matrix-provided Python version, and run abi3audit only for wheels whose filename indicates an ABI3 build.
  • Simplify cibuildwheel repair commands in pyproject.toml to 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.

Comment on lines 202 to 215
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
Copy link

Copilot AI Feb 8, 2026

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 | 🟡 Minor

Torch install may fail for 3.14t on nightly CUDA targets.

When UV_INDEX contains /nightly/, the step tries uv pip install --prerelease=allow -v torch. If PyTorch doesn't publish free-threaded 3.14 wheels yet, this will fail those matrix entries. Since fail-fast: false is 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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.

@oraluben
Copy link
Collaborator Author

oraluben commented Feb 9, 2026

@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 torch-c-dlpack-ext don't have corresponding whl. That is easy to workaround to exclude it with python 3.14:

https://github.com/tile-ai/tilelang/pull/1805/changes#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R36

LeiWang1999
LeiWang1999 previously approved these changes Feb 9, 2026
@LeiWang1999
Copy link
Member

@oraluben we can currently let user build it from source on my opinion if just for python3.14t.

@LeiWang1999
Copy link
Member

LGTM, and feel free to let it in if you think this is ready.

@oraluben
Copy link
Collaborator Author

oraluben commented Feb 9, 2026

@oraluben we can currently let user build it from source on my opinion if just for python3.14t.

Makes sense. I disable 3.14t job and keep the code changes for possible future usage.

@oraluben oraluben merged commit 8aff21d into tile-ai:main Feb 9, 2026
13 checks passed
@oraluben oraluben deleted the add-build-for-ft branch February 9, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants