⬆️🐍 Adopt nanobind 3 split-mode wheels - #2209
Merged
Merged
Conversation
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
denialhaag
marked this pull request as draft
August 22, 2026 12:46
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
denialhaag
force-pushed
the
renovate/nanobind-3.x
branch
from
August 22, 2026 12:54
980260d to
2d5b716
Compare
denialhaag
reviewed
Aug 22, 2026
denialhaag
force-pushed
the
renovate/nanobind-3.x
branch
from
August 22, 2026 13:09
2d5b716 to
98a7817
Compare
(cherry picked from commit 9190c61)
Assisted-by: Claude Opus 5 via Claude Code (cherry picked from commit 9e9ab1a)
Build one cp311-abi3 wheel for GIL-enabled CPython and one cp315-abi3t wheel for free-threaded CPython. Drop Python 3.10 and pre-3.15 free-threading, add the backend runtime dependency, migrate the bindings, and hand dense DD vectors directly to NumPy. Assisted-by: GPT-5 via Codex
Use thread-local DD scratch state and random engines, atomic implicit-register counters, and a mutex for the process-wide symbolic-variable registry. Assisted-by: GPT-5 via Codex
Guard device registration, persistent opens, client sessions, and per-device jobs while keeping provider calls and object destruction outside collection locks. Assisted-by: GPT-5 via Codex
Record the Python floor, split wheel matrix, free-threading hardening, DD export optimization, and attribution-preserving integration in the changelog and ExecPlan. Assisted-by: GPT-5 via Codex
denialhaag
reviewed
Aug 22, 2026
8 tasks
Use scoped locks and explicitly discard released ownership pointers as required by the hosted clang-tidy configuration. Assisted-by: GPT-5 via Codex
Keep nanobind exception RTTI visible in macOS split modules so the runtime backend can catch typed exceptions. Capture transferred DD storage pointers to satisfy the hosted unused-return check. Assisted-by: GPT-5 via Codex
Use the same LLVM/MLIR 22.1.8 setup as pull-request wheel builds. The release workflow otherwise cannot configure MQT Core on macOS or Windows. Assisted-by: GPT-5 via Codex
cibuildwheel 4 no longer provides Python 3.13 free-threaded builds and warns that the selector is invalid. Keep only the explicit Python 3.14t exclusion. Assisted-by: GPT-5 via Codex
scikit-build-core leaves SKBUILD_SOABI empty for Windows stable-ABI wheels. Supply nanobind with the free-threaded interpreter ABI so it selects its abi3t path and emits a frontend tag that matches nanobind-backend. Assisted-by: GPT-5 via Codex
cibuildwheel invokes test dependency installs through cmd.exe, which treats PEP 440 comparison operators as shell redirections. The regular Windows job runs the full test suite; wheel jobs retain repaired-wheel and backend import coverage. Assisted-by: GPT-5 via Codex
Keep static MQT, LLVM, and MLIR symbols local while exporting the weak nanobind exception RTTI required by its x86-64 split backend. This restores exception matching without cross-extension symbol interposition. Assisted-by: GPT-5 via Codex
burgholzer
marked this pull request as ready for review
August 22, 2026 18:46
burgholzer
requested changes
Aug 23, 2026
burgholzer
left a comment
Member
There was a problem hiding this comment.
Reviewed all the changes here. This should be pretty close to mergable.
Use the split backend for every Python binding build and declare its runtime dependency unconditionally. Restore full repaired-wheel tests for CPython 3.11 through 3.14 on Windows x64 with a shell-safe dependency install. Simplify the platform branches and release notes. Assisted-by: GPT-5 via Codex
burgholzer
approved these changes
Aug 23, 2026
burgholzer
left a comment
Member
There was a problem hiding this comment.
This should be ready to go in now! 🙌
Should also help with CI times due to the increased caching. This should imply that the Python tests only build a single instead of three wheels, which should make them much faster.
Same for the CD jobs.
12 tasks
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
This PR upgrades MQT Core to nanobind 3 and uses split mode to reduce the release matrix:
cp311-abi3wheel for GIL-enabled CPython 3.11 and newer;cp315-abi3twheel for free-threaded CPython 3.15 and newer;nanobind-backendas the required runtime backend;VectorDD.get_vector();The branch retains Daniel Haag's original nanobind 3 commits and signed cherry-picks of the Python 3.11 work from #2009.
The QDMI synchronization is isolated in one commit. If #1901 lands first, that commit can be dropped because #1901 removes the legacy driver.
Generated installation and tooling pages come from the MQT templates repository and still need a template-side follow-up.
Validation
cp311-abi3andcp315-abi3twheel builds and clean-environment import/DD ownership smoke testsabi3auditfor the classic wheelcheck-wheel-contentsfor both wheelsuvx nox -s lintuv lock --checkgit diff --checkcp311-abi3wheel build with scikit-build-core selecting CMake 4.4.2cp311-abi3andcp315-abi3tartifacts and installednanobind-backendon all release platformsThreadSanitizer cannot start on this ARM64 host because its runtime reports
FATAL: ThreadSanitizer: unexpected memory mapping. Native concurrency tests and a GIL-disabled CPython 3.15 smoke test cover the new synchronization on this host.Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).