⚡️ Optimize release wheels with SDK/Core PGO - #2476
Open
burgholzer wants to merge 24 commits into
Open
burgholzer wants to merge 24 commits into
burgholzer wants to merge 24 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Decode QDMI properties as values or diagnostics and reuse that decoder in both C++ interfaces. Convert remaining client and benchmark exceptions inside their owning libraries, before returning to MLIR. Keep the adapter, benchmark generator, and CLI free of exceptions and RTTI. Remove platform flags and the split CLI entry point. Preserve existing throwing C++ APIs and require invalid CLI input to return a diagnostic with exit status 1. Assisted-by: GPT-6 via Codex
Use the measured Linux Clang 22, full Core LTO, combined PGO and BOLT recipe. Keep SDK library rebuilding in its owning repository and train fresh profiles per Python ABI before configuring the final wheel build. Preserve assertion-enabled development defaults, retain native SDK tools, and split release ABI jobs to fit the hosted resource budget. Adapt the training corpus to the current typed compiler and QIR result contracts. Assisted-by: Codex
burgholzer
force-pushed
the
codex/optimized-release-toolchain
branch
from
September 12, 2026 13:58
706fd8f to
f1eeefe
Compare
Build and run the installed C++ package with the release compiler and manylinux GCC after BOLT and repair. Preserve the source-package inputs and enforce the measured Linux CPU and memory limits. Assisted-by: Codex
Run SDK installation inside the checked provisioning script instead of a curl-to-shell pipeline. Accept an already installed assertion-free 23.1.1 SDK so retained trial artifacts can qualify the production hooks. Assisted-by: Codex
Manylinux does not provide Perl shasum. Use the already required Python standard library for source archive identities on Linux and macOS. Assisted-by: Codex
Use the measured image revisions for release wheels. Let standalone qualification enable C++ tests with the final PGO configuration; the wheel backend already disables those tests for instrumented builds. Assisted-by: GPT-6
Use the native finalist selected by both paired macOS cohorts: ThinLTO for Core and combined SDK/Core PGO. Reuse the existing preparation hooks and select Clang and profile tools from one Xcode installation. Keep the three-worker bound and the SDK/Core deployment targets. The final matched-SDK gate and integrated wheel qualification remain pending. Assisted-by: Codex
Core profiles contain main functions that collide with unrelated CMake probe programs under -Werror. This rejects supported PIC flags and can produce invalid TLS relocations in the final LTO shared library. Apply final LTO and PGO flags as directory compile and link options so compiler probes remain independent of workload profiles. Assisted-by: Codex
The driver tests call dlopen, dlsym, and dlclose directly. Link their own platform loader dependency so the shared-library test build works on manylinux glibc 2.28, where those symbols are not part of libc. Assisted-by: Codex
Apply the driver device search path only to consumers using build RPATHs. Wheel targets use install RPATHs and must not retain a build-directory lookup that can mask missing packaged dependencies. Reject absolute ELF runtime paths during release processing. All thirteen rebuilt wheel binaries have relative runtime paths. Installed numerical, compiler, QIR, CLI, and DD checks pass with the build tree hidden. The path check rejects the three affected libraries in the earlier wheel. Assisted-by: Codex
Retain the selected native SDK recipes and completed platform checks. Keep trial validation distinct from production release dependencies. Assisted-by: GPT-6 via Codex
Add its compile-only target to the test build so clang-tidy resolves the same library headers as the standalone installed-wheel check. Exclude the target from normal builds. Pin the workflow ABI environment repair. Validation: whole-file C++ lint and repository lint pass; cibuildwheel identifier probes preserve default, cp311, and cp315t selection. Assisted-by: Codex
Use fixed native-SDK PGO recipes for Linux and macOS, package SDK helpers with the toolchain, and keep BOLT processing in wheel repair. Remove experiment settings, evaluation code, and phase-report machinery while preserving the study in history. Assisted-by: Codex
Validate the final release recipe with the latest parameter identity, Qiskit import, and dependency updates. Assisted-by: Codex
Exercise device, site, operation, and site-calibration failures through the existing sessionless provider. Require compiler diagnostics and successful recovery after restoring the provider. Assisted-by: Codex
Let installation and Linux wheel repair strip Python modules. Nanobind link-time stripping conflicts with the relocations required by BOLT; remove the obsolete conditional build option. Assisted-by: Codex
Pin the setup and wheel workflows that select the complete 2026.09.14 SDK release. Record that the immutable prior release cannot accept companion archives and that Linux installation requires the manifest on setup-mlir main. Assisted-by: Codex
Adopt main's release-time changelog policy and remove this PR's unpublished changelog entries. Retain the selected wheel recipe and its documentation while clearing the merge conflict that blocked CI. Assisted-by: Codex
10 tasks
Use the container toolchain, train PGO with the MLIR tests, and run both Python ABIs in one cibuildwheel job. Keep SDK rebuilding in Core and share the installed-wheel training exercise with BOLT. Assisted-by: GPT-6 via Codex
burgholzer
force-pushed
the
codex/optimized-release-toolchain
branch
from
September 14, 2026 18:18
cc686e4 to
3443517
Compare
burgholzer
changed the base branch from
main
to
codex/fix-mlir-exception-boundaries
September 14, 2026 18:18
Build the MLIR training targets before uv removes its isolated Python environment, so later CMake regeneration cannot reference a deleted interpreter. Assisted-by: GPT-6 via Codex
Honor the native CMake RPATH option so instrumented builds can run shared-library tests from the build tree. Retain install RPATHs by default and build mqt-cc for the MLIR suite's CLI tests. Assisted-by: GPT-6 via Codex
Use LLVM's per-binary raw-profile merging so the CTest suite does not keep a separate SDK profile for every test process. Assisted-by: GPT-6 via Codex
Reuse the runtime-copy helper on Unix shared builds. Registry discovery starts beside the driver library, so assets copied only beside an executable cannot register bundled devices there. Assisted-by: GPT-6 via Codex
Include test sources without overriding the normal ignore rules, so source archives do not retain cached bytecode from removed tests. Assisted-by: GPT-6 via Codex
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
Build Linux and macOS release wheels with assertion-free SDKs and combined SDK/Core PGO. Linux uses the manylinux container's matched Clang packages, full LTO, and BOLT; macOS uses Apple Clang, ThinLTO, and a 13.3 deployment target. Windows keeps its normal build.
Core owns SDK rebuilding and trains with the existing C++ MLIR suite plus one shared installed-wheel exercise. Common cibuildwheel hooks cover both Unix platforms and both Python ABIs. Linux repair validates the optimized wheel and installed Clang/GCC consumers.
Depends on SDK #94, its September 15 release, Setup #255, and Workflows #464. Stacked on #2545, which owns the exception-boundary fixes.
Validation: the Linux ARM64 joint run passed both ABIs, PGO/BOLT, and installed Clang/GCC consumers. Each ABI passed 2,800 MLIR training tests; the stable wheel passed 1,396 Python tests (two skips), and the free-threaded wheel passed its configured import check. Lints and the source-archive check passed. Hosted wheels await the SDK/installer dependencies; Linux x86 also hit a registry HTTP 502. AI assisted implementation, review, and validation.
Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).