Skip to content

✨ Add a bounded QDMI device checker - #2600

Closed
flowerthrower wants to merge 51 commits into
codex/slurm-shared-deploymentfrom
codex/qdmi-device-checker
Closed

flowerthrower wants to merge 51 commits into
codex/slurm-shared-deploymentfrom
codex/qdmi-device-checker

Conversation

@flowerthrower

@flowerthrower flowerthrower commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Add mqt-core-qdmi-check --device ID --timeout SECONDS on Linux and macOS. It selects a device through the same client opening API as the Slurm adapter, accepts IDLE/BUSY, and shares its availability check without submitting a job. A supervised worker bounds initialization, status queries, and process-exit cleanup; provider output is suppressed. Native installations and Python wheels expose the same command.

The checker uses Core's runtime-copy helper and installs directly in bin. Builds retain CMake's dependency paths; installation applies the existing relocatable RPATH.

Fixes #2311. Stacked on #2599. The MIT checker has no Slurm or GPL dependency. Success is a readiness snapshot, not a reservation or submission guarantee.

The native checker needs its own catalogue configuration; it does not inherit Python entry-point discovery or in-process manifest registration.

Validation

  • Full Nox lint and changed-file C++ lint pass on Linux with Clang 23.
  • Both native shared-build checker CTests pass with an inherited invalid MQT_CORE_QDMI_DRIVER. The installed-catalogue regression also reproduces the failure before test isolation and passes afterward.
  • All 20 focused Slurm adapter and installed CLI tests pass against the final wheel, including checker argument forwarding.
  • The complete Slurm 25.11.2 Docker suite passes against the stacked wheel.
  • macOS and Windows were not rerun locally. Hosted checks are still running; the failed aggregate belongs to cancelled duplicate run 37966953454.

Codex assisted implementation, validation, and this description. Human review and acceptance are pending.

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.

Move source-only configuration injection and shared provider fixtures into Core. Keep provider authentication and workload execution in the job process.

Real Slurm and both provider integration runs remain pending local Docker setup.

Assisted-by: GPT-6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Keep provider source filtering, installation and loaded-library assertions in Core. Prove conflicting values are present in the actual Slurm daemon environment before checking job isolation.

Lint standalone SPANK separately because its Slurm headers and compilation database are independent of the Core runtime build.

Assisted-by: GPT-6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Keep the existing Braket two-worker build limit in the shared provider installer.

Validation: shell syntax check and full Core nox lint, including ty, passed on this tree.

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Keep main integration checks and cache wiring while sharing the provider fixture.

Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
@flowerthrower flowerthrower added feature New feature or request c++ Anything related to C++ code QDMI Anything related to QDMI labels Sep 22, 2026
@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.22034% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/qdmi/Check.cpp 90.4% 8 Missing ⚠️

📢 Thoughts on this report? Let us know!

flowerthrower and others added 10 commits September 23, 2026 09:08
Build the wheel and native Runtime once before selecting the test installation. Mount source only during setup and keep build tools out of runtime images.

Assisted-by: GPT-6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Share the existing device availability check with a supervised native CLI. Package the checker in native installs and wheels, and cover provider failures, deadlines, cleanup, and installed launchers.

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT-6 Astra via Codex
Keep the worker unreaped until its process group is cleaned up, and arrange Linux parent-death termination for outer launch-validator cancellation. Add a focused parent-death case to the installed checker CLI suite.

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT-6 Astra via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Distinguish the earlier validation from the focused native checks on current main.

Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
@flowerthrower
flowerthrower force-pushed the codex/qdmi-device-checker branch from 59dff77 to 95b6201 Compare September 23, 2026 08:24
flowerthrower and others added 5 commits September 23, 2026 11:13
Use build-tree RPATHs for the checker and its QDMI dependencies, following the existing test-target policy. CMake still applies the installation RPATH to installed targets.

Assisted-by: GPT-6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Assisted-by: GPT-6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
🤖 *AI text below* 🤖

Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
🤖 *AI text below* 🤖

Remove the manual build-tree RPATH that survives installation. Exercise the installed command with a distinct catalogue while the build tree remains present.

Assisted-by: GPT-6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
flowerthrower and others added 6 commits October 8, 2026 14:39
🤖 *AI text below* 🤖

Retain the shared fixture and use the new client-visible QDMI device discovery API from main.

Assisted-by: GPT-6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
🤖 *AI text below* 🤖

Adapt the checker to the renamed QDMI header and always-shared driver. Reuse the updated runtime-copy helper and install the checker directly in bin.

Assisted-by: GPT-6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
🤖 *AI text below* 🤖

Keep the existing separation between build and install RPATHs. The runtime-copy helper does not update the copied SC device dependency paths, so using install RPATHs in the build tree still prevents device loading.

Assisted-by: GPT-6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
🤖 *AI text below* 🤖

Include the documentation policy update that landed during merge validation.

Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
🤖 *AI text below* 🤖

Propagate the current Core documentation policy through the PR stack.

Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
@mergify mergify Bot added the conflict label Oct 9, 2026
🤖 *AI text below* 🤖

The builtin driver now retains device sessions for the process lifetime. Exercise the existing shutdown deadline through provider exit cleanup, preserving the separate initialization-hang and worker-cleanup assertions.

Assisted-by: GPT-6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
@mergify mergify Bot removed the conflict label Oct 9, 2026
🤖 *AI text below* 🤖

Describe generic driver-session selection and the builtin driver’s catalogue initialization. Remove stale promises of isolated fresh device sessions.

Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
🤖 *AI text below* 🤖

Inherit the shared Slurm documentation correction and clarify that the checker selects a device through the generic opening API.

Assisted-by: GPT-6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Select the candidate Core wheel and its adapter extras even when providers
pin another source revision. Exclude host-only CMake presets from Docker
build input. Refresh main and describe licensing and caching directly.

Assisted-by: GPT-6 via Codex
Clear inherited driver selection in builtin-runtime tests. Document the
native checker catalogue boundary and process-exit cleanup. Include the
updated shared Slurm base.

Assisted-by: GPT-6 via Codex
@burgholzer

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

The availability command is incorporated into #2599 (b965ed922), rebased on main and using #2715's common launcher and runtime installation helpers. The separate availability header and Python launcher are removed. Focused native tests cover IDLE/BUSY, unavailable devices, initialization timeout, and exit-handler timeout; the fresh-wheel Slurm test covers explicit job gating. Closing this separate layer in favor of the consolidated PR.

@burgholzer burgholzer closed this Oct 9, 2026
@mergify mergify Bot removed the conflict label Oct 9, 2026
@burgholzer
burgholzer removed this pull request from stack #2727 October 10, 2026 01:25
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 feature New feature or request QDMI Anything related to QDMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Probe QDMI availability in the Slurm playground

2 participants