Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Concurrent GPU mode tasks race while updating the shared auto_print handler.
Review effort: Balanced
Findings: 1
Open (3)
What changed in this PR
Consolidates verify-suite compile modes per target while reusing one reference result.
Changes:
- Runs GPU verification in eager and balanced modes.
- Removes duplicate
_eagertest registrations. - Adds generated enum name conversion helpers.
Review performed as a single pass without agent fan-out.
| File | Description |
|---|---|
test/verify/run_verify.hpp |
Adds per-target compile modes. |
test/verify/run_verify.cpp |
Executes modes against one reference result. |
test/verify/main.cpp |
Configures GPU modes. |
src/include/migraphx/compile_modes.hpp |
Converts the enum to MIGRAPHX_ENUM_CLASS. |
src/compile_modes.cpp |
Uses generated enum entries and names. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+228
to
+230
| results.emplace_back( | ||
| tname + "(" + to_string(mode) + ")", | ||
| detach_async([=] { return run_target(t, p, m, mode_opts); }, ti.parallel)); |
| balanced = 50, | ||
| max = 100 | ||
| }; | ||
| MIGRAPHX_ENUM_CLASS(compile_modes, eager = 0, balanced = 50, max = 100) |
Comment on lines
+228
to
+230
| results.emplace_back( | ||
| tname + "(" + to_string(mode) + ")", | ||
| detach_async([=] { return run_target(t, p, m, mode_opts); }, ti.parallel)); |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5357 +/- ##
===========================================
+ Coverage 92.68% 92.72% +0.04%
===========================================
Files 633 636 +3
Lines 36092 36207 +115
===========================================
+ Hits 33450 33570 +120
+ Misses 2642 2637 -5
🚀 New features to boost your workflow:
|
TedThemistokleous
approved these changes
Oct 11, 2026
This branch has not been deployed
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
The verify suite registered every program twice, once as
test_name(balanced) and once astest_name_eager, which doubled the test count and ran the ref target twice per program. The compile mode is a per-target property, so the harness should decide which modes to exercise rather than the test registration. This also givescompile_modesa proper name mapping so results and logs can print the mode instead of hand-maintained switch statements.Technical Details
target_infogains acompile_modesvector (default{balanced}), andrun_verify::set_compile_modes_for(name, modes)configures it.main.cppsets the GPU target to{eager, balanced}, since it is the only target that readscompile_options::compile_mode.run_verify::verifyruns the ref target once, then compiles and runs each target under every supported mode, comparing all against the same ref results. Result labels aretarget(mode), e.g.gpu(eager), so failures identify the mode._eagerduplicate test cases are removed fromrun_verify::run.compile_modesis now declared withMIGRAPHX_ENUM_CLASS, providingto_string,operator<<,from_string, andenum_entriesautomatically.convert_to_compile_modeusesenum_entriesinstead of a hand-written mode array and string comparison chain; the case-insensitive and integer fallback behavior is unchanged.Changelog Category
Add a
CHANGELOG.mdentry for any option other thanNot ApplicableFollow the LLVM AI Tool Use Policy for contributions using AI.