Output stacks (support for SVG visualization) (#48438)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48438
Outputting stacks in a format suitable for SVG vizualization
(e.g. with https://github.com/brendangregg/FlameGraph tool)
Test Plan:
python test/test_profiler.py -k test_export_stacks
e.g. resnet18 (note: actual SVG is interactive):
<img width="1193" alt="Screen Shot 2020-11-24 at 7 06 27 PM" src="https://user-images.githubusercontent.com/30845429/100178160-397f3500-2e88-11eb-81c4-34b19c5fcb87.png">
Reviewed By: dzhulgakov
Differential Revision: D25174270
Pulled By: ilia-cher
fbshipit-source-id: 6b60084071b209441805c468f5ff777318e42d1a