[AIMIGRAPHX-1100] Add no-rebuild callback for verify#5067
Draft
eddieliao wants to merge 8 commits into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5067 +/- ##
===========================================
+ Coverage 92.89% 92.90% +0.01%
===========================================
Files 603 603
Lines 32448 32526 +78
===========================================
+ Hits 30140 30217 +77
- Misses 2308 2309 +1 🚀 New features to boost your workflow:
|
Regressions detected 🔴 * No develop baseline was found for this PR's branch point; compared against the latest available develop run instead. |
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a --no-rebuild verification mode to the MIGraphX driver that performs a single reference run and a single target run while tracing instruction outputs by debug symbol, enabling layer-wise divergence reporting without recompiling for --reduce/--bisect workflows.
Changes:
- Adds
verify_options::no_rebuildand wires--no-rebuildinto the driver CLI. - Introduces a trace-based
verify_callbackthat captures reference outputs by debug symbol and compares them against target outputs. - Updates verify flows (
verify_program, reduced, bisected) to use the new layer-wise compare path when--no-rebuildis enabled.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/driver/verify.hpp | Declares verify_callback and exposes layer-wise compare support from the driver verify interface. |
| src/driver/verify.cpp | Implements trace-based capture/compare, baseline error attribution, and integrates --no-rebuild into verify/reduce/bisect modes. |
| src/driver/verify_options.hpp | Adds no_rebuild option to the verify options struct. |
| src/driver/main.cpp | Adds --no-rebuild CLI flag and help text for verify. |
Comment on lines
+296
to
+298
| // Last-writer-wins on the symbol keeps the fused op's final value, not an interior one. | ||
| target_outputs[symbol] = {output.copy(), ins->name(), order, std::move(inputs)}; | ||
| }; |
Comment on lines
+451
to
+462
| bool any_failed = false; | ||
| for(const auto& [symbol, lr] : vcb->results) | ||
| { | ||
| if(not lr.passed) | ||
| { | ||
| any_failed = true; | ||
| log::error() << "FAILED at " << lr.symbol << " (" << lr.op << ")"; | ||
| } | ||
| } | ||
| if(not any_failed) | ||
| log::info() << "MIGraphX verification passed successfully."; | ||
| return; |
Comment on lines
+49
to
+53
| // Captures ref outputs by debug symbol and compares each target op at its terminal symbol. | ||
| struct verify_callback | ||
| { | ||
| using trace_function = std::function<void(instruction_ref, const argument&)>; | ||
|
|
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.
Motivation
Technical Details
Changelog Category
Add a
CHANGELOG.mdentry for any option other thanNot ApplicableFollow the LLVM AI Tool Use Policy for contributions using AI.