✨ Add the MLIR compiler target foundation - #1993
Merged
Merged
Conversation
Introduce an immutable, provider-independent target model with validated metadata, cached topology, native capability queries, and a typed synthesis basis. Keep the foundation in a dependency-pure MLIR library and cover construction, validation, routing, gate orientation, and real QCO operations. Co-authored-by: Simon Hofmann <simon.t.hofmann@tum.de> Assisted-by: GPT-5.6 via Codex
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Move file-local helpers out of the anonymous namespace and give them explicit static linkage, matching the LLVM 22 lint contract without changing behavior. Assisted-by: GPT-5.6 via Codex
Store std::ranges results as iterator values instead of relying on libc++'s pointer-like std::array representation. Assisted-by: GPT-5.6 via Codex
Use each array's const-iterator type explicitly so MSVC's iterator model and LLVM's qualified-auto rule are both satisfied without suppressions. Assisted-by: GPT-5.6 via Codex
Deduce range-result iterators so MSVC retains its class iterator while libc++ can expose a pointer. Suppress only the two contradictory qualified-auto diagnostics and keep modernize-use-auto enabled. Assisted-by: GPT-5.6 via Codex
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
Introduce the MLIR-owned
mlir::CompilerTargetfoundation for compilingprograms against concrete devices without coupling the compiler model to FoMaC,
QDMI, or the legacy CoreIR target.
The target is immutable and cheaply copyable. It validates and retains
provider-defined nonnegative site IDs, optional names and coherence times,
canonical undirected topology, ordered operation loci, optional calibration,
and typed native-gate capabilities. It caches dense site mappings, adjacency,
all-pairs distances, and a target-wide synthesis basis once at construction.
Absent topology means all-to-all connectivity; absent operations mean every
operation is native.
The standalone
MQTCompilerTargetlibrary links only MLIR/QCO infrastructureand owns its public header in the build tree. Focused tests cover construction,
validation, topology/capability combinations, ordered loci, basis derivation,
QCO operation queries, and shared detached storage.
This is CT-01, the first compiler-side prerequisite in the compact
QDMI–Compiler integration series that will culminate in #1687. Relevant native
operation aliases derived from #1969 retain Simon Hofmann’s authorship in the
commit metadata.
This foundation is not independently user-facing, so its changelog coverage is
intentionally carried by the mapping, synthesis, and final integration PRs in
the series. No upgrade note is needed for the unreleased compiler collection.
The repository currently installs MQT MLIR archives without headers or CMake
exports; a complete installed MLIR C++ dependency closure and external consumer
test remain an explicit PIPE/INT series item instead of a partial CT-only rule.
Validation
CompilerTargetTest.*suiteChecklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).