This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm-tirx.git
The following commit(s) were added to refs/heads/main by this push:
new d4106ba04 [FIX] Keep optional LLVM wheel companion libraries external
(#74)
d4106ba04 is described below
commit d4106ba04c9af4c748e7a79c6ab6c79b02655ca9
Author: Tianqi Chen <[email protected]>
AuthorDate: Sun Oct 25 18:37:11 2026 -0400
[FIX] Keep optional LLVM wheel companion libraries external (#74)
The optional LLVM targets wheel depends on compiler and runtime
libraries supplied by its matching main wheel. Linux and Windows repair
tools currently try to locate and vendor those companion libraries,
preventing optional wheel packaging.
Exclude the companion compiler/runtime libraries only in the optional
wheel repair step while preserving the existing main-wheel repair
settings and other dependency exclusions.
---
.github/actions/build-wheel-for-publish/action.yml | 2 +-
ci/wheel/tvm-tirx-llvm-targets/pyproject.toml | 28 ++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/.github/actions/build-wheel-for-publish/action.yml
b/.github/actions/build-wheel-for-publish/action.yml
index f3a05ed7c..93dbd0272 100644
--- a/.github/actions/build-wheel-for-publish/action.yml
+++ b/.github/actions/build-wheel-for-publish/action.yml
@@ -92,7 +92,7 @@ runs:
uses: pypa/cibuildwheel@b3395e271a35f73dad77f21802abe9b986dfe299 #
v4.3.1
with:
package-dir: ci/wheel/tvm-tirx-llvm-targets
- config-file: pyproject.toml
+ config-file: ci/wheel/tvm-tirx-llvm-targets/pyproject.toml
output-dir: wheelhouse-llvm-targets
env:
CIBW_BUILD: ${{ inputs.build }}
diff --git a/ci/wheel/tvm-tirx-llvm-targets/pyproject.toml
b/ci/wheel/tvm-tirx-llvm-targets/pyproject.toml
index c64d71fb7..8fd5aab46 100644
--- a/ci/wheel/tvm-tirx-llvm-targets/pyproject.toml
+++ b/ci/wheel/tvm-tirx-llvm-targets/pyproject.toml
@@ -42,3 +42,31 @@ wheel.install-dir = "tvm_tirx_llvm_targets"
[tool.scikit-build.cmake.define]
TVM_TIRX_BUILD_PYTHON_MODULE = "OFF"
TVM_TIRX_LLVM_NATIVE_ONLY = "OFF"
+
+[tool.cibuildwheel]
+skip = "*-win32 *-manylinux_i686 *-musllinux*"
+build-verbosity = 1
+test-requires = ["pytest", "numpy"]
+
+# The matching main wheel supplies the compiler/runtime libraries. The optional
+# LLVM backend does not link the CUDA runtime or its driver/toolkit
dependencies.
+[tool.cibuildwheel.linux]
+repair-wheel-command = "auditwheel repair --exclude libtvm_ffi.so --exclude
libtvm_tirx_compiler.so --exclude libtvm_runtime.so -w {dest_dir} {wheel}"
+
+[tool.cibuildwheel.macos]
+# Preserve the repaired backend library's ad-hoc signature on arm64 macOS.
+repair-wheel-command = '''
+set -euo pipefail
+DELOCATE_TMP_DIR="$(mktemp -d)"
+delocate-wheel --ignore-missing-dependencies --exclude libtvm_ffi.dylib
--require-archs {delocate_archs} -w "$DELOCATE_TMP_DIR" -v {wheel}
+python -m pip install -q wheel
+TMP_DIR="$(mktemp -d)"
+python -m wheel unpack "$DELOCATE_TMP_DIR"/*.whl -d "$TMP_DIR"
+find "$TMP_DIR" -type f \( -name "*.dylib" -o -name "*.so" \) -exec codesign
--force --sign - {} +
+python -m wheel pack "$TMP_DIR"/*/ -d {dest_dir}
+rm -rf "$DELOCATE_TMP_DIR" "$TMP_DIR"
+'''
+
+[tool.cibuildwheel.windows]
+before-build = 'python -m pip install "delvewheel>=1.12.0"'
+repair-wheel-command = 'delvewheel repair --analyze-existing --ignore-existing
--exclude "*tvm_ffi*.dll" --exclude tvm_tirx_compiler.dll --exclude
tvm_runtime.dll -w {dest_dir} {wheel}'