This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[OpPerf] Profiler flag for Python, Cpp #15881
Merged
Merged
Conversation
This file contains 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
access2rohit
approved these changes
Aug 14, 2019
apeforest
approved these changes
Aug 15, 2019
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.
LGTM.
anirudhacharya
pushed a commit
to anirudhacharya/mxnet
that referenced
this pull request
Aug 20, 2019
* first * flag for timing python * delete old file * added profiler example * add operator name to python profile output * add other pending files with profiler flag * change cpp to native - for user-facing api * fixes * Trigger notification * Trigger notification * Trigger notification * markdown update for python
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Added a flag to run benchmark using either MXNet's default profiler (built-in Cpp profiler) or Python's time module
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Signatures of few functions changes.
However, changes are backward compatible
Note
While MXNet's built-in profiler (CPP profiler) dumps separate information about forward and backward pass
With respect to Python's time module, it currently is not feasible to calculate on that level.
Right now, python time module is used to calculate average of total time taken for 1 run of operator.
Hence, output of cpp profiler is
avg_time_forward_opname
while output of python profiler isavg_time_opname
By default,
In case of opperf.py (running for all operators)
if the operator has backward, then backward call is profiled along with forward
Test
Verified the code doesn't break using following commands
1. All Operators
Positive tests
Original (without flag)
New (With flag)
For python
For cpp
Negative tests
2. Per operator category
Positive tests
Original (without flag)
New (With flag)
For python
For cpp
Negative tests
3. Specific operator
Positive tests
Original (without flag)
New (With flag)
For python
For cpp
Negative tests
Comments
@sandeep-krishnamurthy @apeforest @access2rohit