cjolivier01 commented on a change in pull request #8972: Profiling
enhancements, python API, vtune and chrome tracing objects, etc.
URL: https://github.com/apache/incubator-mxnet/pull/8972#discussion_r169480736
##########
File path: python/mxnet/profiler.py
##########
@@ -52,7 +58,298 @@ def profiler_set_state(state='stop'):
state2int = {'stop': 0, 'run': 1}
check_call(_LIB.MXSetProfilerState(ctypes.c_int(state2int[state])))
-def dump_profile():
+def dump(finished=True):
"""Dump profile and stop profiler. Use this to save profile
- in advance in case your program cannot exit normally."""
- check_call(_LIB.MXDumpProfile())
+ in advance in case your program cannot exit normally.
+
+ Parameters
+ ----------
+ finished : boolean
+ Indicates whether to stop statistical output (dumping) after this dump.
+ Default is True
+ """
+ fin = 1 if finished is True else False
+ check_call(_LIB.MXDumpProfile(fin))
+
+def aggregate_stats_str(reset=False):
Review comment:
How about stats_str() ?
I stole this format from the python class Executor::debug_str() call, which
returns the same basic type of thing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services