Conversation
1 task
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The parallel test does not reliably exercise worker-thread propagation, and the header copyright range needs updating.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR propagates exceptions from simple_par_for worker threads and adds regression tests.
Changes:
- Captures and rethrows worker-thread exceptions after joining.
- Adds serial and parallel exception-handling tests.
File summaries
| File | Summary |
|---|---|
test/simple_par_for.cpp |
Adds exception tests; the parallel test should explicitly force the worker-thread path. |
src/include/migraphx/simple_par_for.hpp |
Implements exception propagation; update the copyright range to include 2026. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+43
to
+46
| migraphx::par_for(64, 1, [](std::size_t i) { | ||
| if(i % 2 == 0) | ||
| MIGRAPHX_THROW("par_for_error"); | ||
| }); |
Comment on lines
+30
to
+31
| #include <exception> | ||
| #include <mutex> |
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
This will help improve error reporting. When an exception is thrown with multiple threads,
std::terminateis called without the exception message. So this will marshall the exception through so we can get a better error message.Technical Details
Changelog Category
Add a
CHANGELOG.mdentry for any option other thanNot ApplicableFollow the LLVM AI Tool Use Policy for contributions using AI.