Skip to content

Commit 9e1f001

Browse files
authored
remove flamegraph (#2869)
Co-authored-by: Shivam Raikundalia <[email protected]>
1 parent ea12380 commit 9e1f001

File tree

1 file changed

+3
-31
lines changed

1 file changed

+3
-31
lines changed

recipes_source/recipes/profiler_recipe.py

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
# 4. Using profiler to analyze memory consumption
3535
# 5. Using tracing functionality
3636
# 6. Examining stack traces
37-
# 7. Visualizing data as a flame graph
38-
# 8. Using profiler to analyze long-running jobs
37+
# 7. Using profiler to analyze long-running jobs
3938
#
4039
# 1. Import all necessary libraries
4140
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -122,7 +121,7 @@
122121
# aten::select 1.668ms 2.292ms 8.988us 255
123122
# --------------------------------- ------------ ------------ ------------ ------------
124123
# Self CPU time total: 57.549m
125-
#
124+
#
126125

127126
######################################################################
128127
# Here we see that, as expected, most of the time is spent in convolution (and specifically in ``mkldnn_convolution``
@@ -327,35 +326,8 @@
327326
#
328327
# (Warning: stack tracing adds an extra profiling overhead.)
329328

330-
331-
######################################################################
332-
# 7. Visualizing data as a flame graph
333-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
334-
#
335-
# Execution time (``self_cpu_time_total`` and ``self_cuda_time_total`` metrics) and stack traces
336-
# can also be visualized as a flame graph. To do this, first export the raw data using ``export_stacks`` (requires ``with_stack=True``):
337-
338-
prof.export_stacks("/tmp/profiler_stacks.txt", "self_cuda_time_total")
339-
340-
######################################################################
341-
# We recommend using `Flamegraph tool <https://github.com/brendangregg/FlameGraph>`_ to generate an
342-
# interactive ``.svg`` file:
343-
#
344-
# .. code-block:: sh
345-
#
346-
# git clone https://github.com/brendangregg/FlameGraph
347-
# cd FlameGraph
348-
# ./flamegraph.pl --title "CUDA time" --countname "us." /tmp/profiler_stacks.txt > perf_viz.svg
349-
#
350-
351-
######################################################################
352-
#
353-
# .. image:: ../../_static/img/perf_viz.png
354-
# :scale: 25 %
355-
356-
357329
######################################################################
358-
# 8. Using profiler to analyze long-running jobs
330+
# 7. Using profiler to analyze long-running jobs
359331
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
360332
#
361333
# PyTorch profiler offers an additional API to handle long-running jobs

0 commit comments

Comments
 (0)