Skip to content

📦 Ship relocatable QDMI bundles and native tools - #2724

Closed
burgholzer wants to merge 4 commits into
codex/release-wheel-ltofrom
codex/qdmi-runtime-wheels
Closed

burgholzer wants to merge 4 commits into
codex/release-wheel-ltofrom
codex/qdmi-runtime-wheels

Conversation

@burgholzer

@burgholzer burgholzer commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Consolidated into #2715. Continue review and optimization there; the runtime packaging changes, simplifications, and measured size reductions are now part of one PR.

Description

Follow-up to #2715. QDMI device bundles can be copied with their worker, manifests, and declared assets without Core's private shared libraries. Wheels preserve the Python APIs and expose the QDMI C runtime and both native tools through find_package(mqt-core).

Three commits separate the work:

  1. Use static native DD/common/configuration dependencies. Keep one private shared DD for Python DD/MLIR objects and compile only the two DD-facing adapters against it.
  2. Split Runtime and Development installation/export sets. Add mqt-cc and MQT::mqt-cc alongside MQT::mqt-core-bench; keep C++ SDK targets source-only, with static MQT::CoreDD. An explicit Development request rejects a wheel installation.
  3. Stage declared bundle files and remove recursive dependency discovery and the synthetic Windows target.

Windows import libraries remain included for public shared targets. Private Python support libraries stay unexported. macOS signing-aware installation is preserved. delvewheel --ignore-existing remains necessary to preserve bundled DLL names and locations used by CMake imports and standalone native tools; normal repair and filename controls do not provide an equivalent native installation layout.

Validation

  • Native release: 3,983 passed, one skipped.
  • Repaired manylinux ARM64 wheel: 1,938 Python tests passed, two skipped (optional QIR Runner and Python-version-specific Qiskit C API coverage). Includes DD/MLIR object exchange and relocated device loading.
  • auditwheel repair and strict abi3audit passed. No LLVM/MLIR static archives or development export set in the wheel.
  • External CMake consumer configured without LLVM/MLIR, linked the C driver, and ran both imported tools. Relocated DDSIM executed through its worker; SC loaded its configurations without Python startup.
  • Source-installed static DD consumers compiled and ran with GCC 13 and Clang 23.
  • Repository lint, the full executable documentation build against the repaired wheel, and generated documentation link checks passed. Hosted Windows/macOS qualification is pending. Packaging run was dispatched explicitly because the stacked PR change filter skipped packaging.

The repaired ARM64 wheel grows from 49.17 MiB to 66.21 MiB (+17.04 MiB); mqt-cc contributes 16.59 MiB compressed. The baseline ten-wheel set totals 370.75 MiB; the corresponding new total and other platform sizes await hosted artifacts.

AI assistance: implementation and validation by Codex; human review is required before merging.

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope, as required by our AI Usage Guidelines.
  • Every agent-authored or agent-edited public text body begins with the visible disclosure 🤖 *AI text below* 🤖 (titles are exempt).
  • I have disclosed AI assistance in the PR description.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

Use Clang/LLD on Linux, Apple Clang on macOS, and speed optimization in
nanobind modules. Define wheel deployment and IPO settings once and extend
them with cibuildwheel overrides. Explicitly deploy the separate Slurm
wheel build while keeping native source-build defaults.

Enable Windows automatic exports only for shared libraries without explicit
exports. Preserve IPO for explicitly exported DLLs; disable it for MSVC
objects that CMake must scan. Keep QIR C entry points noexcept, report
recoverable allocation errors through their existing outputs, and stop
failed workers without unwinding generated frames.

Preserve macOS install RPATH for code signing and use build-tree paths on
Linux. Remove private SHA and installed-consumer test fixtures; retain
public hash coverage and validate runtime failure isolation.

Assisted-by: GPT-6 via Codex
Use static DD, common, and SC configuration libraries in native bundles.
Keep a private shared DD for Python modules, with only the two DD-facing
MLIR adapters compiled against it, so exchanged DD objects share constants.

Keep build policy private and publish only the device C interfaces.

Assisted-by: GPT-6 via Codex
Expose the QDMI C runtime and both native tools through wheel CMake
packages. Keep C++ development targets and static archives in source
installations, and require the Development component for SDK consumers.

Add the compiler command, reuse the benchmark launcher, and update the
installation guide and executable examples for the distribution contract.

Assisted-by: GPT-6 via Codex
Copy device libraries and their declared worker, manifests, and assets.
Remove recursive dependency discovery and the synthetic Windows target.
Test loading relocated devices without private wheel libraries. Preserve
bundled Windows DLL names and locations for native consumers.

Assisted-by: GPT-6 via Codex
@burgholzer burgholzer self-assigned this Oct 9, 2026
@burgholzer burgholzer added enhancement Improvement of existing feature packaging Anything related to Python packaging QDMI Anything related to QDMI labels Oct 9, 2026
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
python/mqt/core/_bench.py 0.0% 2 Missing ⚠️
python/mqt/core/_commands.py 88.8% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@burgholzer
burgholzer force-pushed the codex/release-wheel-lto branch from 23fcc22 to 83be162 Compare October 9, 2026 17:58
@burgholzer burgholzer closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement of existing feature packaging Anything related to Python packaging QDMI Anything related to QDMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant