-
-
Notifications
You must be signed in to change notification settings - Fork 73
♻️ Define target compilation with payload specifications #2219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5b4c1a4
✨ Record typed compiler target environments in MQT IR
burgholzer 741c2cd
♻️ Define target compilation with payload specifications
burgholzer 8ccedc1
📝 Align payload model release target
simon1hofmann 20984b3
🐛 Load math for target native synthesis
simon1hofmann ff704c1
✨ Accept exact payload version shorthand
simon1hofmann 321d8dd
📝 Clarify target and payload prerequisites
simon1hofmann 4c05ee9
Apply batched suggestions from code review
simon1hofmann 7ba9534
🎨 Restore QCO namespace-closing comment
simon1hofmann 95e5fec
📝 Add payload and target environment examples
simon1hofmann 8a050a0
🧪 Adapt new target tests to payload environments
simon1hofmann 0555f26
♻️ Share the selected target environment
burgholzer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # Independent compiler capability prototype | ||
|
|
||
| Status: implemented. | ||
|
|
||
| ## Scope and release boundary | ||
|
|
||
| Core #2219 owns the compiler-only representation of selected program execution | ||
| capabilities and the corresponding target environment. It has no dependency on | ||
| the QDMI 1.4 adoption branch. Core PR #2162 adds control-flow legalization. Core | ||
| PR #2227 is the separate QDMI integration layer. Settled compiler-target and | ||
| typed attribute support already landed through #2218, #2323, and #2215. | ||
|
|
||
| The compiler-only payload model targets Core 4.0. Core #2365 and QDMI #523 track | ||
| the separate QDMI 1.4 adaptation for Core 4.1 and do not gate this prototype. | ||
| Rebase mechanics do not settle format identity, operation sets, execution | ||
| guarantees, classical capabilities, or opaque-program semantics. | ||
|
|
||
| ## Preserved behavior | ||
|
|
||
| Target inference rejects unknown topology or gate sets. Retain fixed and | ||
| variadic operation arities, arbitrary controlled DDSIM gates, and zero-arity | ||
| global phase. Retain current QCO linearity checks, reusable-function boundaries, | ||
| and SDK input support. Do not reintroduce superseded target-inference commits. | ||
|
|
||
| The canonical pipeline keeps target-aware decomposition and deterministic | ||
| placement for all-to-all connectivity, with routing only for explicit graphs. | ||
| Mapping, native synthesis, and conformance consume the validated module | ||
| environment through MLIR's analysis manager. Placement and decomposition retain | ||
| their current target-taking factories. The pipeline builder receives the | ||
| selected environment, attaches it at entry, and seeds the analysis with its | ||
| prepared target. Standalone passes decode the module attribute on demand. The | ||
| environment is immutable during compilation. The typed pair has no unused DLTI | ||
| extension or query layer. | ||
|
|
||
| ## Implementation | ||
|
|
||
| The prototype types and cached analysis live in | ||
| `mlir/Compiler/TargetEnvironment.h` and `TargetEnvironment.cpp`; typed metadata | ||
| belongs to the MQT dialect. `mlir/lib/Compiler/Pipeline.cpp` owns pipeline | ||
| execution. Keep `Programs.cpp` focused on the program representation. | ||
|
|
||
| Bindings and `mqt-cc` accept a selected environment, while untargeted output | ||
| selection stays separate. No unreleased QDMI APIs or provider SDK dependencies | ||
| are introduced. Capability records remain prototype vocabulary until the design | ||
| tracker settles their semantics. | ||
|
|
||
| ## Validation | ||
|
|
||
| Run the independent release build, compiler/mapping/synthesis/MQT IR tests, | ||
| command-line checks, Python compiler and QDMI regressions, generated stubs, | ||
| lint, and C++ lint. Explicitly cover missing environments, invalidation after | ||
| metadata changes, variadic gates and global phase, unsupported output without | ||
| consuming input, and preservation of current linearity checks. | ||
|
|
||
| The prior capability-snapshot validation passed the release build and 3,879 | ||
| native tests, with one existing optional-device skip. All 558 targeted Python | ||
| tests passed with the superconducting reference device enabled. Stub generation | ||
| and C++ lint passed. | ||
|
|
||
| ## Audit decisions and validation | ||
|
|
||
| The selected environment is the pipeline's only input. Its initialization pass | ||
| attaches the typed pair and seeds the analysis with the prepared immutable | ||
| target; standalone passes decode IR on demand. Regression tests cover shared | ||
| target storage, cache retention and invalidation, and replacement of stale | ||
| metadata. The unused DLTI extension and query layer is removed. | ||
|
|
||
| The optimized native build passed all 3,204 configured tests, with one existing | ||
| optional-device skip. Repository lint passed. C++ lint covers whole changed | ||
| files in the PR diff. |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.