Skip to content

✨ Compile from explicit target descriptions - #2754

Merged
burgholzer merged 1 commit into
mainfrom
codex/explicit-compiler-target
Oct 13, 2026
Merged

burgholzer merged 1 commit into
mainfrom
codex/explicit-compiler-target

Conversation

@burgholzer

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

mqt-cc --target now compiles from an explicit #mqt.compilation_target attribute without opening a QDMI device. CompilerTarget.__str__() supplies that representation from Python. The existing target parser, validation, mapping, synthesis, and payload selection are reused; --payload-spec remains required and --qdmi-device is mutually exclusive.

Extracted independently from the keynote branch (#2685), based directly on main; no dependency on the other extracted changes. The target-compilation guide includes a complete CLI example and explains snapshot semantics. Review caught an assertion when an empty argument reached MLIR parsing; empty and whitespace-only values now receive the normal invalid-target diagnostic.

Validation: eight native CLI checks and all 15 Python CLI tests pass locally, including serialized Python-to-CLI target handoff. Stub regeneration, whole-file C++ lint, and repository lint pass. The two new native target tests fail on upstream before extraction. Independent ponytail review has no unresolved findings. Hosted CI is pending.

AI assistance covered extraction, independent review, regression fixes, validation, and this description within the user-authorized scope. Human acceptance/review remains.

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.

Accept a validated compilation-target attribute through --target and
serialize CompilerTarget from Python. Reuse target compilation and payload
selection without opening a QDMI device. Diagnose empty target arguments
before MLIR parsing and test the Python-to-CLI handoff.

Assisted-by: GPT-6 via Codex
@burgholzer burgholzer added enhancement Improvement of existing feature c++ Anything related to C++ code python Anything related to Python code MLIR Anything related to MLIR labels Oct 13, 2026
@burgholzer burgholzer self-assigned this Oct 13, 2026
@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.42857% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
mlir/tools/mqt-cc/mqt-cc.cpp 91.4% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@burgholzer burgholzer added this to the v4.1.0 - QDMI 1.4 / MQSF milestone Oct 13, 2026
@burgholzer
burgholzer merged commit b930f4f into main Oct 13, 2026
25 checks passed
@burgholzer
burgholzer deleted the codex/explicit-compiler-target branch October 13, 2026 18:29
@burgholzer burgholzer mentioned this pull request Oct 13, 2026
8 of 10 tasks
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 enhancement Improvement of existing feature MLIR Anything related to MLIR python Anything related to Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant