-
Notifications
You must be signed in to change notification settings - Fork 646
[Backend Tester] Report delegation statistics #12846
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: gh/GregoryComer/92/head
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12846
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit bd79ef2 with merge base 3a02146 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
For reviewers, is there a better way to present the operator counts? Are there other delegation-related stats that we should include? |
ghstack-source-id: cc7e564 ghstack-comment-id: 3115647824 Pull-Request: pytorch#12846
in the test report. | ||
""" | ||
if counter is not None: | ||
return str(dict(sorted(counter.items()))) |
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.
we can make this pretty but OK for now
elapsed = time.perf_counter() - lower_start_time | ||
extra_stats["lower_time"] = timedelta(seconds=elapsed) | ||
except Exception as e: | ||
elapsed = time.perf_counter() - lower_start_time | ||
extra_stats["lower_time"] = timedelta(seconds=elapsed) | ||
return build_result(TestResult.LOWER_FAIL, e) | ||
|
||
# Compute delegation statistics. Use the ETRecord to access the edge dialect graph between |
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.
Curious why do we need to go through ETRecord?
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.
This is because we need the graph in between to_edge and to_backend when using to_edge_transform_and_lower in order to see the edge-dialect graph before partitioning. In theory, we have the info with the exported program, but it's aten dialect and pre-decompositions, so it's hard to reason about what's delegated.
With to_edge_transform_and_lower, we don't otherwise have a way to inspect the graph between the edge and lowering steps. ETRecord has effectively the same problem (they need the pre-delegation edge graph), so I'm using it here.
Report total number of delegated and undelegated nodes and breakdown by operator count.
Example from CoreML add: