pytorch/caffe2/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
..
hip Change hip filename extension to .hip (#14036) 2018-11-16 11:55:59 -08:00
math Add elementwise_affine for layer_norm_op (#19713) 2019-04-26 17:20:01 -07:00
threadpool caffe2 | Use _aligned_free in WorkerPool destruction (#19751) 2019-04-25 14:54:50 -07:00
bench_utils.cc
bench_utils.h Lightweight at-most-once logging for API usage (#20745) 2019-05-23 23:17:59 -07:00
cast.h
cast_test.cc
cblas.h
CMakeLists.txt CMakeLists changes to enable libtorch for Android (#19762) 2019-05-03 09:28:53 -07:00
conversions.h caffe2 | Windows compat fixes 2019-04-23 14:30:19 -07:00
cpu_neon.h
cpuid.cc
cpuid.h
cpuid_test.cc
eigen_utils.h Export PyTorch erf to ONNX Erf and add Caffe2 Erf operator 2019-01-17 09:18:08 -08:00
fatal_signal_asan_no_sig_test.cc Windows shared build (#13550) 2018-11-16 12:16:28 -08:00
filler.h Delete Tensor::swap(), replace with pointer swap (#12730) 2019-01-25 08:25:07 -08:00
fixed_divisor.h Document hip-clang and its __HIP__ macro (#16771) 2019-02-05 15:13:52 -08:00
fixed_divisor_test.cc Enable ROCm multi-gpu with Gloo 2019-05-07 09:55:47 -07:00
GpuBitonicSort.cuh
GpuDefs.cuh Added HIP top_k operator (#13747) 2018-11-08 20:14:53 -08:00
GpuScanUtils.cuh Separate affine_channel from math and optimize it (#16135) 2019-01-18 22:40:16 -08:00
map_utils.h
math-detail.h
math.h Move math::Axpy function to elementwise lib (#18316) 2019-03-26 12:19:19 -07:00
math_cpu.cc enable CopyVector for type of int32_t (#19931) 2019-04-29 22:24:06 -07:00
math_gpu.cu enable CopyVector for type of int on CUDA (#20520) 2019-05-15 16:53:51 -07:00
math_gpu_test.cc Update math::Transpose to support tensor with size > 2G (#17670) 2019-03-20 18:22:21 -07:00
math_test.cc Update math::Transpose to support tensor with size > 2G (#17670) 2019-03-20 18:22:21 -07:00
murmur_hash3.cc
murmur_hash3.h
proto_convert.cc
proto_convert.h
proto_utils.cc Add support for getting TensorProto argument (#18364) 2019-04-02 20:58:28 -07:00
proto_utils.h Fix the return value of ParseFromString (#19262) 2019-04-15 12:39:29 -07:00
proto_utils_test.cc caffe2 - Util to cleanup external inputs and outputs from a NetDef (#18194) 2019-03-22 11:23:03 -07:00
proto_wrap.cc
proto_wrap.h
signal_handler.cc Remove unused var (ws_) and use vars in undefined case for compile (#20667) 2019-05-20 13:52:57 -07:00
signal_handler.h
simple_queue.h Fix issues under caffe round 1 2019-01-23 19:04:59 -08:00
simple_queue_test.cc
smart_tensor_printer.cc
smart_tensor_printer.h
smart_tensor_printer_test.cc
string_utils.cc
string_utils.h Add backward pass to infer single missing input shape for Concat opportunitiscally (#18911) 2019-04-05 10:11:58 -07:00
zmq_helper.h