Skip to content

🐛 Return QDMI and benchmark errors before MLIR - #2545

Open
burgholzer wants to merge 2 commits into
mainfrom
codex/fix-mlir-exception-boundaries
Open

burgholzer wants to merge 2 commits into
mainfrom
codex/fix-mlir-exception-boundaries

Conversation

@burgholzer

@burgholzer burgholzer commented Sep 12, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Return QDMI and benchmark diagnostics before entering RTTI-free MLIR code. The shared QDMI decoder supports both value/error and existing throwing interfaces; the owning C++ libraries catch the remaining device and JSON exceptions. The adapter, generator, and CLI no longer need exception/RTTI overrides or a split entry point.

Preserve CLI diagnostics, UTF-8 paths, and existing output files on failure. Tests cover provider query failures, normalized benchmark metadata, and exit status 1. This PR owns these fixes; release optimization remains in #2476, stacked on this branch.

Validation: local release with IPO disabled passed 3,548 C++ tests with one expected skip. Whole-file C++ lint and repository lint passed. Hosted C++/Python tests, documentation, coverage, and lint pass on this head.

AI assistance: implemented and checked with Codex.

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.

@burgholzer burgholzer added fix Fix for something that isn't working c++ Anything related to C++ code MLIR Anything related to MLIR QDMI Anything related to QDMI labels Sep 12, 2026
@burgholzer burgholzer self-assigned this Sep 12, 2026
@burgholzer
burgholzer force-pushed the codex/fix-mlir-exception-boundaries branch from 18f186e to e95a1ee Compare September 12, 2026 11:05
@burgholzer burgholzer added this to the v4.1.0 - QDMI 1.4 / MQSF milestone Sep 12, 2026
@mergify mergify Bot added the conflict label Sep 12, 2026
@burgholzer
burgholzer force-pushed the codex/fix-mlir-exception-boundaries branch from c5bdf1b to 46025a6 Compare September 12, 2026 11:55
@mergify mergify Bot removed the conflict label Sep 12, 2026
@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.17199% with 40 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
mlir/bench/MQTCoreBench.cpp 72.2% 30 Missing ⚠️
mlir/lib/Compiler/QDMIAdapter.cpp 98.3% 3 Missing ⚠️
src/qdmi/Client.cpp 90.6% 3 Missing ⚠️
src/qdmi/common/Common.cpp 88.0% 3 Missing ⚠️
include/mqt-core/qdmi/Client.hpp 96.6% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@burgholzer burgholzer changed the title 🐛 Preserve MLIR exception diagnostics on macOS 🐛 Return QDMI and benchmark errors before MLIR Sep 12, 2026
@burgholzer
burgholzer force-pushed the codex/fix-mlir-exception-boundaries branch 2 times, most recently from f410460 to bb0ae82 Compare September 12, 2026 12:59
@mergify mergify Bot added the conflict label Sep 14, 2026
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
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
@burgholzer
burgholzer force-pushed the codex/fix-mlir-exception-boundaries branch from bb0ae82 to f7553f5 Compare September 14, 2026 18:08
@mergify mergify Bot removed the conflict label Sep 14, 2026
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 MLIR Anything related to MLIR QDMI Anything related to QDMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant