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
Add Median/p50, p90, p99 to python profiler #15953
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d226c38
median,avg,p90,p99
ChaiBapchya 3c890b3
Trigger notification coz of gpu windows fail
ChaiBapchya 3dc6efb
Merge branch 'master' into median,p50,p99
ChaiBapchya a941e0a
Trigger notification
ChaiBapchya b46ecae
Trigger notification
ChaiBapchya 5a56aa3
add _time
ChaiBapchya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
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.
Can you give an example case what are now sent in modified_args ?
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.
Currently when you run opperf
args are -
[op, runs, args]
runs is the # of times we want to run this operator
For python profiler to work, we need to call the operator explicitly those many times
Hence runs = args[1] stores the number of times user wanted to run the operator
Now, the alias takes the argument to run MXNet profiler on it
We're overwriting on that, hence we pass run=1 to MXNet profiler
modified args =
[op, 1, args]
Does that answer your question?
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 where we decide which profiler to call (selects which decorator to use 'cpp' or 'python'
https://github.com/ChaiBapchya/incubator-mxnet/blob/5a56aa3580e2f78a1a78581fe8b8f179962a3a5a/benchmark/opperf/utils/benchmark_utils.py#L56
The reason why I had to modify the args, was because I wanted to reuse the function
https://github.com/ChaiBapchya/incubator-mxnet/blob/cba7c4e360d843d523b29be7fb52fa220fcafa92/benchmark/opperf/utils/ndarray_utils.py#L23
Here it runs the operator runs number of times. But I can't add python time functions here as it will change the behavior of the function for python as well as cpp decorator. Hence I had to override the function by modifying the arguments passed.