tlopex opened a new pull request, #19647: URL: https://github.com/apache/tvm/pull/19647
## Motivation TVM currently has no official binary wheels on PyPI, so most users must build from source. This adds a `cibuildwheel`-based pipeline that produces manylinux / macOS / Windows wheels with LLVM linked **statically** and, for Linux CUDA builds, bundles TVM's CUDA runtime DSO while leaving NVIDIA CUDA libraries user-provided. The result is a wheel that works out of the box for CPU use and enables CUDA when the user has a compatible CUDA installation. Build behavior lives in `pyproject.toml` (the cibuildwheel/scikit-build-core source of truth); the workflow only supplies the per-run environment. ## How it works 1. **Linux CUDA wheels:** `CIBW_BEFORE_ALL_LINUX` installs the CUDA toolkit in the manylinux container and builds `libtvm_runtime_cuda.so`. 2. `cibuildwheel` builds the main wheel with LLVM **static** and CUDA off. CMake bundles the prebuilt CUDA runtime via `TVM_PACKAGE_EXTRA_LIBS`, with no post-build wheel rewriting. 3. The wheel is repaired with the standard tool per platform:`auditwheel` / `delocate` / `delvewheel`, excluding `libtvm_ffi` (from `apache-tvm-ffi`) and NVIDIA CUDA libraries (provided by the user/system). 4. The `tests/python/wheel` smoke suite runs against the installed wheel. 5. Optional jobs upload via `pypa/gh-action-pypi-publish` using trusted publishing plus attestation, then re-install from the index to verify. After the review and be ready to upload to the PyPI, the TestPyPI-only distribution override path can be removed: - `ci/scripts/package/set_wheel_dist.py` - `distribution_name` / `distribution_version` workflow inputs and validation - corresponding build-action inputs and `TVM_WHEEL_DIST_NAME` / `TVM_WHEEL_DIST_VERSION` environment variables - the `set_wheel_dist.py` invocation in `pyproject.toml`'s cibuildwheel `before-build` - TestPyPI override documentation in `ci/scripts/package/README.md` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
