MXNet has a built-in profiler which is compatibule with both Intel® VTune™ Amplifier as well as Chrome's chrome://tracing visualization engine. When built witht he USE_VTUNE=1 flag, MXNet makes actual VTune API calls to define Domains, Frames, Tasks, Events Counters, and Markers. For a detailed explanation of these, see Instrumentation and Tracing Technology API Reference
.. autosummary::
:nosignatures:
mxnet.profiler
.. currentmodule:: mxnet
.. autosummary::
:nosignatures:
profiler.set_config
profiler.set_state
profiler.pause
profiler.resume
profiler.dump
profiler.dumps
These profiling objects can be created and accessed from python in order to resord performance information of the python code paths
.. autosummary::
:nosignatures:
profiler.Domain
profiler.Task
profiler.Frame
profiler.Event
profiler.Counter
profiler.Marker
profiler.set_config(profile_all=True,
filename='chrome_tracing_profile.json', # File used for chrome://tracing visualization
continuous_dump=True,
aggregate_stats=True) # Stats printed by dumps() call
profiler.set_state('run') # Start profiling engine
#
# Profile this section of code
#
profiler.pause() # Pause profiling
#
# Don't profile this section
#
profiler.resume() # Resume profiling
#
# Profile this section of code
#
profiler.set_state('stop') # Stop profiling engine (optional)
print(profiler.dumps()) # Print aggregate statistics if aggregate_stats was set to True
.. automodule:: mxnet.profiler
:members:
Can you improve this documentation? These fine people already did:
Aaron Markham & Chris OlivierEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close