Skip to content

Instantly share code, notes, and snippets.

@ilia-cher
Created September 18, 2020 08:49
Show Gist options
  • Save ilia-cher/1ef60eb686ec49af8e405c03e6967e7f to your computer and use it in GitHub Desktop.
Save ilia-cher/1ef60eb686ec49af8e405c03e6967e7f to your computer and use it in GitHub Desktop.
python benchmarks/profiler_benchmark/profiler_bench.py
Payload: loop; 256 iterations, N = 100
Profiling disabled, tensor size 1x1, use cuda: False, with stacks: False, use script: False
avg. time: 0.903 ms, stddev: 0.024 ms
time per iteration: 0.004 ms
Profiling enabled, tensor size 1x1, use cuda: False, with stacks: False, use script: False
avg. time: 14.326 ms, stddev: 1.697 ms
time per iteration: 0.056 ms
ython benchmarks/profiler_benchmark/profiler_bench.py --with_stack
Payload: loop; 256 iterations, N = 100
Profiling disabled, tensor size 1x1, use cuda: False, with stacks: True, use script: False
avg. time: 1.035 ms, stddev: 0.205 ms
time per iteration: 0.004 ms
Profiling enabled, tensor size 1x1, use cuda: False, with stacks: True, use script: False
avg. time: 28.821 ms, stddev: 1.708 ms
time per iteration: 0.113 ms
python benchmarks/profiler_benchmark/profiler_bench.py --use_script
Payload: loop; 256 iterations, N = 100
Profiling disabled, tensor size 1x1, use cuda: False, with stacks: False, use script: True
avg. time: 0.640 ms, stddev: 0.020 ms
time per iteration: 0.003 ms
Profiling enabled, tensor size 1x1, use cuda: False, with stacks: False, use script: True
avg. time: 14.085 ms, stddev: 0.615 ms
time per iteration: 0.055 ms
(python_venv) iliacher@devgpu151:~/local/pytorch (src_profile)$ python benchmarks/profiler_benchmark/profiler_bench.py --use_script --with_stack
Payload: loop; 256 iterations, N = 100
Profiling disabled, tensor size 1x1, use cuda: False, with stacks: True, use script: True
avg. time: 0.959 ms, stddev: 0.038 ms
time per iteration: 0.004 ms
Profiling enabled, tensor size 1x1, use cuda: False, with stacks: True, use script: True
avg. time: 19.048 ms, stddev: 1.965 ms
time per iteration: 0.074 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment