pytorch/torch/utils
Dmytro Dzhulgakov c25e33789e Lightweight at-most-once logging for API usage (#20745)
Summary:
Resubmit #20698 which got messed up.

Idea is that when PyTorch is used in a custom build environment (e.g. Facebook), it's useful to track usage of various APIs centrally. This PR introduces a simple very lightweight mechanism to do so - only first invocation of a trigger point would be logged. This is significantly more lightweight than #18235 and thus we can allow to put logging in e.g. TensorImpl.

Also adds an initial list of trigger points. Trigger points are added in such a way that no static initialization triggers them, i.e. just linking with libtorch.so will not cause any logging. Further suggestions of what to log are welcomed.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20745

Differential Revision: D15429196

Pulled By: dzhulgakov

fbshipit-source-id: a5e41a709a65b7ebccc6b95f93854e583cf20aca
2019-05-23 23:17:59 -07:00
..
backcompat Simplify python warning settings and cleanup tests. 2017-06-11 05:37:59 -04:00
bottleneck Turn on F401: Unused import warning. (#18598) 2019-03-30 09:01:17 -07:00
data Lightweight at-most-once logging for API usage (#20745) 2019-05-23 23:17:59 -07:00
ffi remove support for c extensions (#12122) 2018-10-01 13:55:28 -07:00
tensorboard Fixes error with custom scalars, fixes #20579 (#20580) 2019-05-23 10:17:36 -07:00
__init__.py arc lint torch/utils (#13141) 2018-10-25 14:59:03 -07:00
_cpp_extension_versioner.py arc lint torch/utils (#13141) 2018-10-25 14:59:03 -07:00
checkpoint.py Allow None for checkpoint (#17969) 2019-03-15 07:38:41 -07:00
collect_env.py Turn on F401: Unused import warning. (#18598) 2019-03-30 09:01:17 -07:00
cpp_extension.py Make a deep copy of extra_compile_flag dictionnary (#20221) 2019-05-13 08:11:39 -07:00
dlpack.py arc lint torch/utils (#13141) 2018-10-25 14:59:03 -07:00
file_baton.py Fix python2 and python 3 compatibility found by lint. (#13140) 2018-10-25 17:20:11 -07:00
hooks.py arc lint torch/utils (#13141) 2018-10-25 14:59:03 -07:00
mkldnn.py Add support for save and load mkldnn modules 2019-05-23 12:51:50 -07:00
model_zoo.py add/move a few apis in torch.hub (#18758) 2019-04-10 23:10:39 -07:00