Update.
[profiler-torch.git] / README.md
1
2 This is a simple profiler to estimate processing time per module per function.
3
4 It seems to work okay, but there was no heavy testing so far. See test-profiler.lua for a short example.
5
6 ### profiler.decorate(model, [functionsToDecorate]) ###
7
8 This function should be called before starting the computation.
9
10 It replaces functions specified in functionsToDecorate by instrumented versions which keep track of computation times. If functionsToDecorate is not provided, it decorates by default updateOutput and backward.
11
12 It also resets the accumulated timings to zero.
13
14 ### profiler.print(model, [nbSamples], [totalTime]) ###
15
16 Prints the measured processing times. If nbSamples is provided, the time per samples will also be printed. If totalTime is provided, the percentages will also be printed.