Skip to content

Conversation

dorde-antic
Copy link
Contributor

@dorde-antic dorde-antic commented Oct 8, 2025

Motivation

Technical Details

Returns non zero when exception is caught in createPerformanceReporots.py and createFusionPerformanceReports.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

@dorde-antic dorde-antic marked this pull request as ready for review October 8, 2025 11:27
@dorde-antic dorde-antic requested a review from causten as a code owner October 8, 2025 11:27
@dorde-antic dorde-antic changed the title Ensure CI fails when perf report is not found Ensure CI fails without performance report generation Oct 8, 2025
@dorde-antic
Copy link
Contributor Author

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:
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@umangyadav umangyadav requested a review from Copilot October 10, 2025 13:18
Copy link
Contributor

@Copilot Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants