-
Notifications
You must be signed in to change notification settings - Fork 49
Ensure CI fails without performance report generation #2021
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
base: develop
Are you sure you want to change the base?
Conversation
There is a need to check with team which of the approaches would be the best for resolving the known cause of the silent errors, so for now this PR is made so that we don't get misleading green CI result due to the missing performance report. |
try: | ||
printAllPerformance(sys.argv[1], 'conv') | ||
printAllPerformance(sys.argv[1], 'gemm') | ||
except FileNotFoundError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to handle all exceptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have already suggested me that, but I forgot to do it. Sorry.
I'll make the change to consider all exceptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhernandez0 added to handle all exceptions as well, but kept special case when its FileNotFoundError exception since that is one with the biggest chance to occur
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures CI fails when performance report generation encounters errors by modifying exception handling to return non-zero exit codes instead of silently continuing.
- Removes local try-catch blocks that were silently handling FileNotFoundError exceptions
- Adds proper exception handling at the main function level with explicit error messages and exit codes
- Changes behavior from graceful degradation to explicit failure when performance reports cannot be generated
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
mlir/utils/performance/createPerformanceReports.py | Moved exception handling from function level to main level with explicit exit codes |
mlir/utils/performance/createFusionPerformanceReports.py | Moved exception handling from function level to main level with explicit exit codes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Motivation
This PR ensures that we don't have silent errors in create performance reports phase. The cause of the silent errors (and one non-silent) which were noticed is known and tracked (https://github.com/ROCm/rocMLIR-internal/issues/1984). There is a need to check with team which of the approaches would be the best for resolving the cause, so for now this PR is made so that we don't get misleading green CI result due to the missing performance report.
Resolves https://github.com/ROCm/rocMLIR-internal/issues/2024
Technical Details
Returns non zero when exception is caught in
createPerformanceReporots.py
andcreateFusionPerformanceReports.py
.Test Plan
Nightly run
Test Result
It's complicated to force the bug scenario to occur itself, since it occurs from time to time (as explained in the issue #1984 mentioned in Motivation). Imo the most important thing is that nightly (where is the change supposed to have effect) is passing after the change. However, nightly should be monitored in future and it should fail in cases which are covered by changes in this PR.
Submission Checklist