Skip to content

⚡️ Optimize QDMI driver session opening - #2460

Merged
burgholzer merged 1 commit into
mainfrom
codex/qdmi-driver-opening-performance
Sep 8, 2026
Merged

⚡️ Optimize QDMI driver session opening#2460
burgholzer merged 1 commit into
mainfrom
codex/qdmi-driver-opening-performance

Conversation

@burgholzer

@burgholzer burgholzer commented Sep 8, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

A slow provider initializer currently blocks fresh sessions for unrelated cached providers. Serialize initialization per loaded module and keep the global cache mutex limited to lookup/insertion, while preserving module aliases, failure retry, and process-lifetime provider ownership.

Remove two redundant inline-configuration copies by moving the owned session snapshot into merging and borrowing strings during synchronous parameter forwarding. A 16 MiB synthetic payload now needs one payload allocation in the snapshot/merge/construction path instead of three; parent and child sessions share the forwarded buffer.

Add regressions for concurrent alias retry during failed initialization, unrelated opening during that wait, and configuration buffer reuse. Both new regressions fail against the original driver. This change is independent of the pending Client/default-driver work in #2229 and #2230 and does not change the QDMI API.

Local validation: 478 QDMI C++ tests passed, with one existing skip (including all 106 native driver tests); repository lint and changed-file C++ lint passed. In the gated initializer probe, the unrelated open completed before release instead of waiting for the full 200 ms observation interval. These are driver-only measurements, not quantum execution or remote throughput claims.

AI assistance is recorded in the signed commit. Human review remains required.

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.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • 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.

Serialize provider initialization per loaded module so slow initializers do
not block unrelated providers. Move owned session defaults through merging
and borrow configuration strings during synchronous parameter forwarding.

Cover concurrent alias retry, unrelated opening, and configuration buffer
reuse by parent and child sessions.

Assisted-by: Codex
@burgholzer burgholzer self-assigned this Sep 8, 2026
@burgholzer burgholzer added c++ Anything related to C++ code fix Fix for something that isn't working QDMI Anything related to QDMI skip-changelog Changes that do not need to show up in the changelog labels Sep 8, 2026
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/qdmi/driver/Driver.cpp 88.8% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@burgholzer
burgholzer enabled auto-merge (squash) September 8, 2026 01:42
@burgholzer burgholzer added this to the v4.0.0 - IEEE Quantum Week milestone Sep 8, 2026
@burgholzer
burgholzer merged commit e265533 into main Sep 8, 2026
26 of 27 checks passed
@burgholzer
burgholzer deleted the codex/qdmi-driver-opening-performance branch September 8, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Anything related to C++ code fix Fix for something that isn't working QDMI Anything related to QDMI skip-changelog Changes that do not need to show up in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant