Repository navigation
⚡ Optimize wheels and isolate native runtimes - #2715
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
8 of 10 tasks
burgholzer
marked this pull request as draft
October 8, 2026 11:24
10 tasks done
burgholzer
force-pushed
the
codex/release-wheel-lto
branch
from
October 8, 2026 21:19
4be0e1b to
c9e4fc8
Compare
burgholzer
marked this pull request as ready for review
October 8, 2026 21:19
10 tasks done
burgholzer
force-pushed
the
codex/release-wheel-lto
branch
from
October 9, 2026 10:27
8e308fd to
fcf206a
Compare
burgholzer
force-pushed
the
codex/release-wheel-lto
branch
from
October 9, 2026 10:50
fcf206a to
d6d02f3
Compare
simon1hofmann
added this pull request to stack #2721
October 9, 2026 11:49
burgholzer
force-pushed
the
codex/release-wheel-lto
branch
from
October 9, 2026 11:49
d6d02f3 to
807f619
Compare
burgholzer
force-pushed
the
codex/release-wheel-lto
branch
2 times, most recently
from
October 9, 2026 15:28
be7a8e2 to
23fcc22
Compare
8 of 10 tasks
burgholzer
force-pushed
the
codex/release-wheel-lto
branch
from
October 9, 2026 17:58
23fcc22 to
83be162
Compare
Use portable Clang/ThinLTO wheels and native source tuning. Keep MSVC IPO for production artifacts; default native MSVC test builds to IPO off. Discard unused release sections and remove unused compiler plugin exports; reuse the compiler context and consolidate native command launchers. Make native QDMI bundles self-contained with static implementation libraries. Preserve one private shared DD for Python object exchange, with only the two DD-facing MLIR adapters compiled separately. Expose the QDMI C runtime and both native tools from wheels. Keep the C++ SDK and static DD in source installations with explicit Development exports. Stage declared bundle files and preserve macOS signing paths. Keep QIR C entry points noexcept, handle known allocation failures through the existing output contract, and contain other failures in the worker. Use portable deployment settings for Slurm's transported wheel. Assisted-by: GPT-6 via Codex
burgholzer
force-pushed
the
codex/release-wheel-lto
branch
from
October 9, 2026 18:48
83be162 to
5938109
Compare
Reject unavailable CMake components before importing targets so source fallback remains usable. Stage QDMI bundles on incremental builds without relinking consumers, and honor the installation switch throughout Core. Keep conditional uv caching while tracking native build inputs and build settings. Resolve Windows DLL paths through the installed distribution. Honor static-library selection and strict C++20 settings, isolate the Cap'n Proto extension requirement, and support native documentation builds. Assisted-by: GPT-6 via Codex
Remove the incremental staging script, dummy consumer, copied input, and test registration. Keep only the explicit installation settings needed by the existing runtime-file installation and configuration checks. Assisted-by: GPT-6 via Codex
burgholzer
commented
Oct 9, 2026
burgholzer
left a comment
Member
Author
There was a problem hiding this comment.
This revamps the CMake, installation, and wheel configuration for MQT Core. It also produces optimized wheels and should, as a result, boost performance.
Additionally, this PR now also ships mqt-cc as part of the PyPI wheel 🎉
This was referenced Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Description
Optimize portable release wheels and provide relocatable QDMI device bundles with a smaller native interface. This combines the build work and #2724 in one PR.
Build Linux wheels with Clang/LLD ThinLTO and macOS wheels with Apple Clang ThinLTO. Keep speed optimization in Python bindings, portable deployment settings in cibuildwheel/Slurm, and native CPU tuning for local source builds.
Keep native DD and device dependencies static. Python DD/MLIR modules share one private DD library; only the two DD-facing adapters compile separately. Wheels expose the QDMI C runtime and both native tools through CMake. Source installations provide the C++ SDK and static DD through the
Developmentcomponent.Copy device libraries and declared worker/manifest/configuration files on incremental builds without relinking consumers. Preserve signing-aware macOS RPATH and Windows DLL names/locations. Private Python support libraries remain unexported.
Remove unused
mqt-ccplugin exports, reuse the compiler context, and discard unused non-Debug link sections. Fold the benchmark launcher into_commands.py, centralize static export definitions, and test console entry points without private imports.Keep MSVC IPO for production artifacts. Native MSVC test builds default IPO off because
/GLlibraries repeat code generation at every test link;-DENABLE_IPO=ONremains available explicitly. This addresses the native Windows build timeout with one default policy. Automatic-export DLLs still disable IPO because CMake cannot scan/GLobjects.Keep QIR C entry points
noexcept, recover known allocation failures through existing error outputs, and contain other failures within the isolated worker.Reject unavailable CMake components before importing targets so FetchContent can fall back to source. Honor installation and static-library switches, support native documentation builds, and enforce C++20 with extensions confined to the dependency that requires them. Resolve Windows DLL paths from the installed distribution.
Retain conditional uv caching for native sources, headers, TableGen, CMake, bundled data, and build settings; uncommitted docs, tests, Python, and stub edits do not rebuild the native package.
Size and performance
Measurements below are from the qualified
83be162aartifacts, before the subsequent native-test policy and build-infrastructure fixes. Repaired manylinux ARM64 wheel, with the same-O3/ThinLTO policy:mqt-cccompressedMeasured hosted standard wheels compared with the previous #2715 build without
mqt-cc:The complete ten-wheel set plus source distribution grows from 372.49 to 389.19 MiB (+4.48%), with
mqt-ccincluded on every platform. macOS and Windows growth is approximately the compiler's compressed size; Linux discards enough unused code to more than recover that cost. No compiler features or worker isolation were removed. Two alternating 20-run compiler probes produced identical output: QFT48 to QIR median 88.2 → 86.3 ms; a 48-qubit layered circuit to optimized QCO 141.5 → 139.5 ms. These are local checks for regressions, not general performance claims.Validation
7bf2fd800: removed the incremental test script and its consumer/input scaffolding. The existing eight runtime-file installation and configuration checks pass, as does repository lint. Ponytail review of the follow-up and connected build paths found no remaining actionable issues. Hosted checks for this revision are pending.656af4bccbefore fixture cleanup: 3,986 native tests passed with one existing skip; repository lint and the C++ lint session passed. Component fallback, optional components, native documentation, disabled installation with MLIR/bindings enabled, and incremental QDMI staging passed focused probes. Ad hoc incremental staging probes passed with Ninja and Ninja Multi-Config; the retained fixture covers installation and configuration validation. A 26-case uv probe verifies selective invalidation; Windows installation-path selection was checked with a mocked Windows API. Hosted Linux/macOS/Windows C++ and Python checks, the aggregate check, and Slurm integration passed for656af4bcc.656af4bcc.593810944passed every Linux/macOS/Windows C++ and Python job, lint, coverage collection, and the aggregate check. Documentation and Slurm integration also passed.83be162a;593810944changed only the MSVC native-test IPO default and its documentation, with production settings unchanged.auditwheeland strictabi3auditpassed._commands.py. Separate subprocess smoke tests run both native tools.AI assistance covered implementation, specialist build/package review, failure diagnosis, and validation. Human review is required before merging.
Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).