Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ilia-cher/2cb249f5b5e3382dda5cb71ff855c2db to your computer and use it in GitHub Desktop.
Save ilia-cher/2cb249f5b5e3382dda5cb71ff855c2db to your computer and use it in GitHub Desktop.
~/local/pytorch (rec_fn_bench_models)$ PYTHONPATH="$(pwd)/benchmarks/experimental_components" python benchmarks/record_function_benchmark/record_function_bench.py
Benchmarking RecordFunction overhead for lstm_jit
Running warmup... finished
Benchmarking with RecordFunction, 1 threads ... finished
<utils.common.Measurement object at 0x7fb23fb58c18>
Record function overhead: with_rec_fn
lstm_jit
Median: 620.98 ms
IQR: 26.02 ms (608.89 to 634.91)
194 measurements, 1 runs per measurement, 1 thread
Benchmarking without RecordFunction, 1 threads ... finished
<utils.common.Measurement object at 0x7fb23fb58c50>
Record function overhead: without_rec_fn
lstm_jit
Median: 604.08 ms
IQR: 20.82 ms (592.95 to 613.77)
199 measurements, 1 runs per measurement, 1 thread
Benchmarking with RecordFunction, 2 threads ... finished
<utils.common.Measurement object at 0x7fb23fb58b00>
Record function overhead: with_rec_fn
lstm_jit
Median: 403.32 ms
IQR: 14.65 ms (394.82 to 409.47)
298 measurements, 1 runs per measurement, 2 threads
Benchmarking without RecordFunction, 2 threads ... finished
<utils.common.Measurement object at 0x7fb23fb58c88>
Record function overhead: without_rec_fn
lstm_jit
Median: 397.79 ms
IQR: 14.74 ms (390.69 to 405.44)
302 measurements, 1 runs per measurement, 2 threads
Benchmarking with RecordFunction, 4 threads ... finished
<utils.common.Measurement object at 0x7fb23fb58e10>
Record function overhead: with_rec_fn
lstm_jit
Median: 270.11 ms
IQR: 8.21 ms (265.75 to 273.96)
444 measurements, 1 runs per measurement, 4 threads
Benchmarking without RecordFunction, 4 threads ... finished
<utils.common.Measurement object at 0x7fb23fb58860>
Record function overhead: without_rec_fn
lstm_jit
Median: 266.64 ms
IQR: 5.20 ms (264.13 to 269.33)
449 measurements, 1 runs per measurement, 4 threads
Benchmarking with RecordFunction, 8 threads ... finished
<utils.common.Measurement object at 0x7fb23fb58828>
Record function overhead: with_rec_fn
lstm_jit
Median: 228.70 ms
IQR: 4.04 ms (226.92 to 230.97)
526 measurements, 1 runs per measurement, 8 threads
Benchmarking without RecordFunction, 8 threads ... finished
<utils.common.Measurement object at 0x7fb23fb58438>
Record function overhead: without_rec_fn
lstm_jit
Median: 223.99 ms
IQR: 8.61 ms (218.91 to 227.52)
539 measurements, 1 runs per measurement, 8 threads
Benchmarking with RecordFunction, 16 threads ... finished
<utils.common.Measurement object at 0x7fb23fb584a8>
Record function overhead: with_rec_fn
lstm_jit
Median: 243.43 ms
IQR: 15.63 ms (233.13 to 248.75)
497 measurements, 1 runs per measurement, 16 threads
Benchmarking without RecordFunction, 16 threads ... finished
<utils.common.Measurement object at 0x7fb23fb58390>
Record function overhead: without_rec_fn
lstm_jit
Median: 238.64 ms
IQR: 12.47 ms (233.67 to 246.14)
501 measurements, 1 runs per measurement, 16 threads
Benchmarking with RecordFunction, 32 threads ... finished
<utils.common.Measurement object at 0x7fb23fb58b38>
Record function overhead: with_rec_fn
lstm_jit
Median: 335.79 ms
IQR: 22.56 ms (324.11 to 346.67)
358 measurements, 1 runs per measurement, 32 threads
Benchmarking without RecordFunction, 32 threads ... finished
<utils.common.Measurement object at 0x7fb23fb58a90>
Record function overhead: without_rec_fn
lstm_jit
Median: 330.86 ms
IQR: 15.63 ms (323.63 to 339.26)
361 measurements, 1 runs per measurement, 32 threads
[--- Record function overhead --]
| lstm_jit
1 threads: ----------------------
with_rec_fn | 620
without_rec_fn | 600
2 threads: ----------------------
with_rec_fn | 400
without_rec_fn | 400
4 threads: ----------------------
with_rec_fn | 270
without_rec_fn | 267
8 threads: ----------------------
with_rec_fn | 229
without_rec_fn | 220
16 threads: ---------------------
with_rec_fn | 240
without_rec_fn | 240
32 threads: ---------------------
with_rec_fn | 340
without_rec_fn | 330
Times are in milliseconds (ms).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment