This folder contains examples of using MXNet profiler to generate profiling results in json files. Please refer to this link for visualizing profiling results.
-
profiler_executor.py. To run this example,
- clone mxnet-memonger (git clone https://github.com/dmlc/mxnet-memonger.git).
- Add mxnet-memonger folder to PYTHONPATH. export PYTHONPATH=$PYTHONPATH:/path/to/mxnet-memonger
- type python profiler_executor.py in terminal.
It will generate a json file named
profile_executor_5iter.json.
-
profiler_imageiter.py. You first need to create a file named
test.rec, which is an image dataset file before running this example. Please follow this tutorial on how to create.recfiles using an existing tool in MXNet. After you created 'test.rec', typepython profiler_imageiter.pyin terminal. It will generateprofile_imageiter.json. -
profiler_matmul.py. This example profiles matrix multiplications on GPU. Please make sure that you have installed a GPU enabled version of MXNet before running this example. Type
python profiler_matmul.pyand it will generateprofile_matmul_20iter.json. -
profiler_ndarray.py. This examples profiles a series of
NDArrayoperations. Simply typepython profiler_ndarray.pyin terminal and it will generateprofile_ndarray.json.