-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Separating result processor out from profiler.py #23251
Conversation
… behaviors of current profile.py
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 can commit the suggested changes from lintrunner.
onnxruntime/python/tools/transformers/profile_result_processor.py
Outdated
Show resolved
Hide resolved
… behaviors of current profile.py
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
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 can commit the suggested changes from lintrunner.
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
onnxruntime/python/tools/transformers/profile_result_processor.py:56
- [nitpick] The error message could be more descriptive. Suggestion: 'Loading profile output from file: {profile_file}...'
print(f"loading profile output {profile_file} ...")
onnxruntime/python/tools/transformers/profile_result_processor.py:59
- [nitpick] The variable name 'sess_time' is not very descriptive. Suggestion: 'session_times' or 'profile_data'.
sess_time = json.load(opened_file)
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 can commit the suggested changes from lintrunner.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
onnxruntime/python/tools/transformers/profile_result_processor.py
Outdated
Show resolved
Hide resolved
docstring should be the first lines Adding Copyright notice Prepend _ for private constants Use a frozenset for quick lookup.
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
onnxruntime/python/tools/transformers/profiler.py:16
- The variable NODES_TYPE_CONTAINING_SUBGRAPH was removed from profiler.py and added to profile_result_processor.py. Ensure all references to this variable are updated accordingly.
NODES_TYPE_CONTAINING_SUBGRAPH = ["Scan", "Loop", "If"]
Description
Separating result processor out from profiler.py without changing the behaviors of current profile.py
Motivation and Context
Less dependency and smaller code for processing profile from other scenarios.