pytorch/torch/autograd
Alexander Sidorov 7a8bc85f47 Profiler: add Self CPU Time Total, CPU time total and other general improvements (#19378)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19378

Function profile events are typically nested. In this diff I
add parent child relationship to the intervals. This way we can
attribute self time easily. As a result, user printing a table from a
profiler trace gets self cpu time.

This diff doesn't try to address CUDA self time as CUDA kernels are
already getting special care in the profiler.

There are also some other minor improvements. Like reporting total CPU
time spent, reversed sorting, aggregated data after the table,
etc.

There is a new unit test added which tests more functionality than
previous profiler test

Reviewed By: zheng-xq

Differential Revision: D14988612

fbshipit-source-id: 2ee6f64f0a4d0b659c6b23c0510bf13aa46f07dc
2019-04-25 20:53:55 -07:00
..
_functions Turn on F401: Unused import warning. (#18598) 2019-03-30 09:01:17 -07:00
__init__.py Turn on F401: Unused import warning. (#18598) 2019-03-30 09:01:17 -07:00
__init__.pyi More type stubs (#18511) 2019-04-01 16:03:58 -07:00
anomaly_mode.py Add autograd automatic anomaly detection (#7677) 2018-06-11 21:26:17 -04:00
function.py Allow passing dicts as trace inputs. (#18092) 2019-04-18 23:52:00 -07:00
grad_mode.py Various example code fixes (#12707) 2018-10-16 21:59:40 -07:00
grad_mode.pyi More type stubs (#18511) 2019-04-01 16:03:58 -07:00
gradcheck.py Add MKL-DNN Tensor (#17748) 2019-04-08 21:41:38 -07:00
profiler.py Profiler: add Self CPU Time Total, CPU time total and other general improvements (#19378) 2019-04-25 20:53:55 -07:00
variable.py Fix B902 lint error: invalid first argument. (#18181) 2019-03-21 09:10:28 -07:00