Create performance model for reduction operators#545
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a first-pass performance model and categorization for single-GPU reduction-style ATen operators, and updates regression artifacts to reflect the new modeling in generated perf reports.
Changes:
- Introduce
Reduce/aten_reduceperf model classes to estimate FLOPs/bytes for reduction-like ops. - Map common
aten::reduce ops to the new perf model and categorize them under a new"Reduce"category. - Add a new checked-in MI300 perf report reference
.xlsxused by perf-report regression tests.
Reviewed changes
Copilot reviewed 2 out of 9 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
TraceLens/PerfModel/perf_model.py |
Adds Reduce and aten_reduce perf model implementation (FLOPs/bytes + param parsing). |
TraceLens/PerfModel/torch_op_mapping.py |
Registers reduce ops → aten_reduce, adds Reduce category and categorization branch. |
tests/traces/mi300/Qwen_Qwen1.5-0.5B-Chat__1016005_perf_report.xlsx |
New reference perf report for regression testing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Fixes #533
The performance model is currently bare-bones, based on O(n) operations being strictly necessary for these reductions.
It could be more tuned but that would depend significantly on the implementation and the theoretical limit is something like n/2 + log(n) at a minimum which is not likely significantly more accurate