Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Update profiler.md (#15477)
Browse files Browse the repository at this point in the history
Add one line "dump all results to log file before download" to the main example. Otherwise, it is likely that a user may download partially-written and broken files.
  • Loading branch information
yifeim authored and szha committed Jul 19, 2019
1 parent 7e632c9 commit d14fa69
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/tutorials/python/profiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ run_training_iteration(*next(itr))
mx.nd.waitall()
# Ask the profiler to stop recording
profiler.set_state('stop')
# Dump all results to log file before download
profiler.dump()
```

Between running and stopping the profiler, you can also pause and resume the profiler using `profiler.pause()` and `profiler.resume()` respectively to profile only parts of the code you want to profile.
Expand Down

0 comments on commit d14fa69

Please sign in to comment.