Skip to content

[CI] Wheel publishing follow-ups#19659

Merged
tqchen merged 1 commit into
apache:mainfrom
tlopex:wheel-followups
Jun 3, 2026
Merged

[CI] Wheel publishing follow-ups#19659
tqchen merged 1 commit into
apache:mainfrom
tlopex:wheel-followups

Conversation

@tlopex
Copy link
Copy Markdown
Member

@tlopex tlopex commented Jun 3, 2026

Follow-ups to the cibuildwheel wheel-publishing flow (#19656):

  • macOS: ad-hoc re-sign the wheel's Mach-O dylibs after delocate. install_name_tool edits invalidate the arm64 code signature and dyld SIGKILLs an invalidly-signed dylib on dlopen, so import tvm crashed with no traceback. New ci/scripts/package/macos_repair_wheel.sh runs delocate, ad-hoc re-signs every Mach-O, and repacks so RECORD matches.
  • Simplify the per-platform CUDA extra-libs in the wheel CMAKE_ARGS: macOS never bundles the CUDA sidecar (drop the always-empty arg); Linux/Windows always do (pass -DTVM_PACKAGE_EXTRA_LIBS unconditionally).
  • Move the wheel post-install checks into tests/python/all-platform-minimal-test, gated behind TVM_WHEEL_EXPECT_LLVM / TVM_WHEEL_EXPECT_CUDA_RUNTIME so they only assert during wheel validation and skip in ordinary source-build CI; the cibuildwheel test-command is now a single pytest invocation.
  • Windows: collapse the two tvm_ffi DLL excludes into the delvewheel glob --exclude "tvm_ffi.dll" and pin delvewheel>=1.12.0 (wildcards need >=1.12.0).

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request simplifies the wheel test command, adds environment-gated checks for LLVM enablement during wheel validation, and updates the macOS and Windows wheel repair commands. Feedback on these changes highlights critical issues where -DTVM_PACKAGE_EXTRA_LIBS is passed unconditionally on Linux and Windows, which will break CPU-only wheel builds. Additionally, it is recommended to extract the complex, multi-step bash command inlined for macOS wheel repair in pyproject.toml into a separate script file to improve maintainability.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread .github/actions/build-wheel-for-publish/action.yml
Comment thread .github/actions/build-wheel-for-publish/action.yml
Comment thread pyproject.toml
Follow-ups to the cibuildwheel wheel-publishing flow (apache#19656):
- macOS: ad-hoc re-sign the wheel's Mach-O dylibs after delocate. install_name_tool
  edits invalidate the arm64 code signature and dyld SIGKILLs an invalidly-signed
  dylib on dlopen, so `import tvm` crashed with no traceback. The macOS
  repair-wheel-command now runs delocate, ad-hoc re-signs every Mach-O, and repacks
  so RECORD matches (inlined into pyproject; no separate script).
- Simplify the per-platform CUDA extra-libs in the wheel CMAKE_ARGS: macOS never
  bundles the CUDA sidecar (drop the always-empty arg); Linux/Windows wheels are
  always CUDA builds (every Linux/Windows matrix row sets include_cuda_runtime=1),
  so pass -DTVM_PACKAGE_EXTRA_LIBS unconditionally.
- Move the wheel post-install checks into tests/python/all-platform-minimal-test,
  gated behind TVM_WHEEL_EXPECT_LLVM / TVM_WHEEL_EXPECT_CUDA_RUNTIME so they only
  assert during wheel validation and skip in ordinary source-build CI; the
  cibuildwheel test-command is now a single pytest invocation.
- Windows: collapse the two tvm_ffi DLL excludes into the delvewheel glob
  --exclude "*tvm_ffi*.dll" and pin delvewheel>=1.12.0 (wildcards need >=1.12.0).
@tlopex tlopex force-pushed the wheel-followups branch from 6b4dc6a to d48e842 Compare June 3, 2026 01:14
@tqchen tqchen merged commit da9b580 into apache:main Jun 3, 2026
10 checks passed
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.

2 participants