-
Notifications
You must be signed in to change notification settings - Fork 325
[Build] Migrate to scikit-build-core #939
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! 🚀 |
WalkthroughMigrates packaging to scikit-build-core, modernizes CMake (≥3.26) and TVM integration, removes legacy setup/tox/install scripts, requires a prebuilt cython_wrapper at import, centralizes third‑party discovery and dynamic version metadata, updates CI/Docker to uv/cibuildwheel flows, and adds a Dist GitHub Actions workflow. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant GH as GitHub Actions
participant Repo as Repository
participant UV as uv
participant CIBW as cibuildwheel / scikit-build-core
participant CMake as CMake (>=3.26)
participant TVM as TVM (load_tvm.cmake)
participant Repair as auditwheel/delocate
participant Store as Artifact Store
Dev->>GH: push / release
GH->>Repo: checkout + submodules
GH->>UV: setup Python env & install build deps via uv
GH->>CIBW: run cibuildwheel (matrix)
CIBW->>CMake: configure & build (load_tvm.cmake, cython_wrapper)
CMake->>TVM: resolve TVM_SOURCE / INCLUDES
CMake-->>CIBW: produce raw wheel(s)
CIBW->>Repair: repair wheel(s)
GH->>Store: upload artifact(s)
sequenceDiagram
autonumber
participant User as pip / installer
participant SB as scikit-build-core
participant CMake as CMake
participant TVM as TVM
User->>SB: pip install -v .
SB->>CMake: configure & build targets (tilelang_module, cython_wrapper, ...)
CMake->>TVM: load via cmake/load_tvm.cmake
TVM-->>CMake: provide headers/targets
CMake-->>SB: built artifacts
SB-->>User: package installed / wheel produced
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🪛 actionlint (1.7.7).github/workflows/dist.yml20-20: label "macos-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file (runner-label) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
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 |
6009644 to
76e9df7
Compare
3fda5c0 to
e813cec
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: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/dist.yml(1 hunks)3rdparty/tvm(1 hunks)pyproject.toml(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- 3rdparty/tvm
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/dist.yml
52-52: property "repair" is not defined in object type {ls-whl: {conclusion: string; outcome: string; outputs: {string => string}}}
(expression)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: build-test-metal
- GitHub Check: build-test-amd
- GitHub Check: build-wheels (ubuntu-22.04-arm)
- GitHub Check: build-wheels (ubuntu-22.04)
- GitHub Check: build-wheels (macos-14)
|
This should be ready for review. Main parts that this PR touched:
|
Co-authored-by: Xuehai Pan <[email protected]>
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/dist.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/dist.yml
53-53: property "repair" is not defined in object type {ls-whl: {conclusion: string; outcome: string; outputs: {string => string}}}
(expression)
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/dist.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/dist.yml
21-21: label "macos-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: build-test-metal
- GitHub Check: build-wheels (ubuntu-22.04-arm)
- GitHub Check: build-wheels (ubuntu-22.04)
LeiWang1999
left a 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.
LGTM
|
* cleanup * init * build first wheel that may not work * build cython ext * fix tvm build * use sabi * update rpath to support auditwheel * pass editible build * update ci * fix warnings * do not use ccache in self host runner * test local uv cache * test pip index * update lib search to respect new lib location * fix * update ci * enable cuda by default * update src map * fix * fix * fix * Generate version with backend and git information at build time * copy tvm_cython to wheels * fix tvm lib search * fmt * remove unused * auto detect ccache * add back backend-related files * remove jit cython adaptor to simplify code * fmt * fix ci * ci fix 2 * ci fix 3 * workaround metal * ci fix 4 * fmt * fmt * Revert "ci fix 4" This reverts commit d1de829. * tmp * fix metal * trivial cleanup * add detailed build-time version for cuda * add back mlc * Restore wheel info and other trivial updates * update * fix cuda * upd * fix metal ci * test for ga build * test for nvidia/cuda * test ubuntu 20 * fix * fix * Do not use `uv build` * fix * fix * log toolchain version * merge wheel * update * debug * fix * update * skip rocm * update artifacts each * fix * fix * add mac * fix cache * fix cache * fix cache * reset and add comment * upd * fix git version * update deps * trivial update * use in-tree build dir and install to src to speedup editable build * Revert "use in-tree build dir and install to src to speedup editable build" This reverts commit 6ab87b0. * add build-dir * update docs * remove old scrips * [1/n] cleanup scripts * [Lint]: [pre-commit.ci] auto fixes [...] * fix and update * wait for tvm fix * revert some tmp fix * fix * fix * spell * doc update * test cibuildwheel * fix and test macos on ci * Update .github/workflows/dist.yml Co-authored-by: Xuehai Pan <[email protected]> * fix * test ga event * cleanup * bump tvm to support api3 * test final version * add cron * Update .github/workflows/dist.yml Co-authored-by: Xuehai Pan <[email protected]> * fix * test ccache for metal cibuildwheel * test newer macos * finish --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Xuehai Pan <[email protected]>
Resolves #833
Closes #756
Detailed information could be found at the doc
This PR basically migrates to a fully cmake-based build system and eliminates python-based building process, and therefore simplifies the building and installing stage.
User and developers of tilelang could just install from source (without setting
PYTHONPATHand so on).cp38-abi3wheels for >= python 3.8 (needs Workaround limit api too high in tvm tvm#12)Unify CUDA and ROCm wheel? Is that possible?FixRemove in-tree jit compileNow tilelang reads version (for cache, etc.) from the package version.
Summary by CodeRabbit
New Features
Documentation
Refactor
Chores