-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Fixing duplication in operator profiling #15240
Fixing duplication in operator profiling #15240
Conversation
@mxnet-label-bot add [Profiler, pr-awaiting-review] |
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 we add few test case?
Yeah, after we merge #15132. This way, I can use the json return to test. |
and 'Count' in target_dict['Time']['operator']['sqrt'] \ | ||
and '_plus_scalar' in target_dict['Time']['operator'] \ | ||
and 'Count' in target_dict['Time']['operator']['_plus_scalar'] | ||
# thet are called once and twice respectively |
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.
typo: they ?
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.
Fixed. Nice catch!
LGTM! just fix the typo in 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.
One minor comment.
src/profiler/profiler.h
Outdated
@@ -843,6 +854,8 @@ struct ProfileTask : public ProfileDuration { | |||
VTUNE_ONLY_CODE(std::unique_ptr<vtune::VTuneTask> vtune_task_); | |||
/*! \brief NVTX duration object */ | |||
NVTX_ONLY_CODE(std::unique_ptr<nvtx::NVTXDuration> nvtx_duration_); | |||
/*! \brief not to add this stat to AggregateStats */ |
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.
nit: 'not to add...' -> Add profiler stat to AggregateStats.
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.
fixed
src/profiler/profiler.h
Outdated
/*! | ||
* \brief Whether to add stat to AggregateStats | ||
*/ | ||
void enableAggregateStats(bool enabled) { |
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.
In the all the places this is True. Except in VTune task case.
Can we make it default parameter with default value True?
So in only VTune Task case, we set it to False. In other places, we don't need to make changes.
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.
I can default enabled to true. enableAggregateStats() is a new function I added and the only place it is called is in line 1167 with enabled == false
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.
enable_aggregate_ has already been defaulted to true
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.
Thanks. LGTM
Hi @Zha0q1, I assume you are closing and opening PR to pass CI? |
Sorry I will use CI more frugally. Yes they are passing locally. |
Thanks. No problem. If it is passing locally and failing in CI, then CI should help us. Please file Github issue if you see Flaky issues so we can fix it. |
Description
fix: #10520
fix: #15243
For detailed explanations of the cause as well the proposed fix of the issue, please refer to https://cwiki.apache.org/confluence/display/MXNET/Fixing+Duplication+in+Operator+Profiling?moved=true
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.