pytorch/c10/util
Scott Wolchok fff1948b02 [PyTorch] intrusive_ptr: don't guarantee release_resources will be called
Pull Request resolved: https://github.com/pytorch/pytorch/pull/76767

We're spending a virtual function call in the common case
where there are no weak references just to save a small amount of care
in intrusive_ptr_target subclasses that override release_resources, of
which there aren't very many.

Differential Revision: [D36109757](https://our.internmc.facebook.com/intern/diff/D36109757/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D36109757/)!

Approved by: https://github.com/ezyang
2022-06-10 19:30:35 +00:00
..
accumulate.h Fix c10 sign-compare violations 2022-04-01 19:15:51 +00:00
AlignOf.h
Array.cpp
Array.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
ArrayRef.h List of SymInt rebase on master 2022-04-20 02:09:55 +00:00
Backtrace.cpp use irange for loops 2 (#66746) 2021-12-10 04:26:23 -08:00
Backtrace.h Canonicalize includes in c10, and add tests for it (#36299) 2020-04-10 12:07:52 -07:00
BFloat16-inl.h [warnings][Caffe2] Suppress warnings in caffe2 headers (#71196) 2022-01-12 10:16:35 -08:00
BFloat16-math.h [fbcode][warnings] Suppress warnings in caffe2/c10 (#71356) 2022-01-15 18:34:08 -08:00
BFloat16.h [AutoAccept][Codemod][FBSourceClangFormatLinter] Daily arc lint --take CLANGFORMAT 2022-02-04 11:14:53 +00:00
Bitset.h Enable win-arm64 2022-02-28 17:17:56 +00:00
BUILD.bazel extract out //c10/util:base library (#70854) 2022-01-26 11:51:45 +00:00
build.bzl extract final two libraries out of //c10/util (#70856) 2022-01-26 16:31:26 +00:00
C++17.cpp
C++17.h 'typename Base' is checked repeatedly (#72842) 2022-03-01 20:34:14 +00:00
complex_math.cpp [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
complex_math.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
complex_utils.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
complex.h [AutoAccept][Codemod][FBSourceClangFormatLinter] Daily arc lint --take CLANGFORMAT 2022-02-04 11:14:53 +00:00
ConstexprCrc.h Remove 9.2 related macros for CONSTEXPR (#65066) 2021-09-17 17:31:20 -07:00
copysign.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
DeadlockDetection.cpp torch/deadlockdetection: add TORCH_DISABLE_DEADLOCK_DETECTION env for use with torch deploy (#77270) 2022-05-12 00:10:59 +00:00
DeadlockDetection.h [PyTorch] Autoformat c10, round 2 (#57645) 2021-05-05 15:45:53 -07:00
Deprecated.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
DimVector.h [PyTorch][easy] Tie DimVector inline size to SizesAndStrides inline size 2022-06-09 16:32:53 +00:00
either.h [PyTorch] Remove unnecessary iostream includes in headers (#61500) 2021-08-19 18:54:51 -07:00
env.h ROCm MIOpen NHWC Convolution support (#63617) 2021-09-10 08:06:32 -07:00
Exception.cpp Disable avoid-non-const-global-variables lint check (#62008) 2021-07-22 18:04:40 -07:00
Exception.h Eliminate unused parameters in PyTorch (#73749) 2022-03-04 02:31:37 +00:00
ExclusivelyOwned.h [PyTorch] Remove buggy ExclusivelyOwnedTraits<intrusive_ptr<T>> (#70647) 2022-01-12 12:19:52 -08:00
flags_use_gflags.cpp Canonicalize includes in c10, and add tests for it (#36299) 2020-04-10 12:07:52 -07:00
flags_use_no_gflags.cpp Disable avoid-non-const-global-variables lint check (#62008) 2021-07-22 18:04:40 -07:00
Flags.h zero initialize some members and other fixes (#59915) 2021-07-19 07:36:26 -07:00
flat_hash_map.h [fbcode][warnings] Suppress warnings in caffe2/c10 (#71356) 2022-01-15 18:34:08 -08:00
FunctionRef.h [codemod][dirsync] Apply clang-format 2021-05-20 21:23:24 -07:00
Half-inl.h Optimize half conversion for SYCL kernel 2022-05-04 00:57:03 +00:00
Half.cpp
Half.h Support ComplexHalf in nonzero and add of sparse_csr input. 2022-06-09 09:46:33 +00:00
hash.h [AutoAccept][Codemod][FBSourceClangFormatLinter] Daily arc lint --take CLANGFORMAT 2022-01-18 01:50:08 -08:00
IdWrapper.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
in_place.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
int128.cpp Fix c10 sign-compare violations 2022-04-01 19:15:51 +00:00
int128.h [AutoAccept][Codemod][FBSourceClangFormatLinter] Daily arc lint --take CLANGFORMAT 2021-10-07 21:09:22 -07:00
intrusive_ptr.cpp
intrusive_ptr.h [PyTorch] intrusive_ptr: don't guarantee release_resources will be called 2022-06-10 19:30:35 +00:00
irange.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
LeftRight.cpp
LeftRight.h [PyTorch] Use c10::Synchronized<T> in RWSafeLeftRightWrapper (#74109) 2022-03-16 16:18:36 +00:00
llvmMathExtras.h Eliminate unused parameters in PyTorch (#73749) 2022-03-04 02:31:37 +00:00
Load.h Accept non-standard bools in more CUDA kernels 2022-06-09 08:31:28 +00:00
logging_is_google_glog.h [pytorch] Route default warning sync to LOG(WARNING) - second try (#36984) 2020-04-23 01:08:00 -07:00
logging_is_not_google_glog.h [Static Runtime] Skip ProcessedNode:: verify_no_memory_overlap() for out variants (#68639) 2021-12-02 05:03:12 -08:00
Logging.cpp [caffe2] drop XROS ports (#76366) 2022-04-26 23:54:22 +00:00
Logging.h Eliminate unused parameters in PyTorch (#73749) 2022-03-04 02:31:37 +00:00
math_compat.h Add Elementwise unary ops 4 references (#78216) 2022-05-27 21:55:34 +00:00
MathConstants.cpp Make c10 clang-tidy clean (#55870) 2021-04-14 11:23:28 -07:00
MathConstants.h c10 mathematical constants (#78910) 2022-06-06 22:21:05 +00:00
MaybeOwned.h Eliminate unused parameters in PyTorch (#73749) 2022-03-04 02:31:37 +00:00
Metaprogramming.cpp
Metaprogramming.h Eliminate unused parameters in PyTorch (#73749) 2022-03-04 02:31:37 +00:00
numa.cpp Disable avoid-non-const-global-variables lint check (#62008) 2021-07-22 18:04:40 -07:00
numa.h
Optional.cpp Remove CUDA 9.2 references conditionals and workarounds (#65070) 2021-09-17 12:28:23 -07:00
Optional.h [PyTorch] Avoid initializing storage for empty Optionals 2022-06-08 03:56:24 +00:00
OptionalArrayRef.h Resolve int[]? arguments to new OptionalIntArrayRef class 2022-03-26 01:45:50 +00:00
order_preserving_flat_hash_map.h [fbcode][warnings] Suppress warnings in caffe2/c10 (#71356) 2022-01-15 18:34:08 -08:00
overloaded.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
python_stub.h
qint8.h [pytorch] add missing host-device attribute to fix clang build (#37358) 2020-04-27 18:24:20 -07:00
qint32.h [pytorch] add missing host-device attribute to fix clang build (#37358) 2020-04-27 18:24:20 -07:00
quint2x4.h [oss][pytorch] Add quint2x4 dtype (#65545) 2021-10-06 14:22:00 -07:00
quint4x2.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
quint8.h Fix misleading doc string in quint8.h (#48418) 2020-11-25 20:48:39 -08:00
Registry.h [PyTorch][easy] Remove double hash table lookup from Registry::Create 2022-06-07 16:43:48 +00:00
reverse_iterator.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
safe_numerics.h Catch overflows in calculating storage byte size 2022-03-31 16:16:03 +00:00
ScopeExit.h [RFC] [PyTorch Edge] Simplify error logging in mobile/import.cpp (#55711) 2021-05-04 20:45:32 -07:00
signal_handler.cpp disable the format library in C10 (#60052) 2021-07-09 12:28:19 -07:00
signal_handler.h Move caffe2 signal_handler to c10. (#56717) 2021-04-26 23:08:12 -07:00
SmallBuffer.h TensorIterator: Reduce serial_for_each static overhead (#58909) 2021-05-30 21:08:54 -07:00
SmallVector.cpp [PyTorch] Update SmallVector from LLVM (#69110) 2021-12-10 11:57:19 -08:00
SmallVector.h Eliminate unused parameters in PyTorch (#73749) 2022-03-04 02:31:37 +00:00
sparse_bitset.h [fbcode][warnings] Suppress warnings in caffe2/c10 (#71356) 2022-01-15 18:34:08 -08:00
strides.h Move ATen/core/DimVector.h to c10/util/DimVector.h. 2022-05-11 01:30:56 +00:00
string_utils.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
string_view.h [warnings][Caffe2] Suppress warnings in caffe2 headers (#71196) 2022-01-12 10:16:35 -08:00
StringUtil.cpp [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
StringUtil.h [fbcode][warnings] Suppress warnings in caffe2/c10 (#71356) 2022-01-15 18:34:08 -08:00
strong_type.h Copy rollbear/strong_type to c10/util 2022-06-07 23:41:59 +00:00
Synchronized.h [PyTorch] Update Synchronized<T>::withLock() to return the type/value from the aceepted callable (#74108) 2022-03-16 16:18:36 +00:00
tempfile.h [DataLoader] Fix tempfile binding and removing for torch_shm_manager (#57566) 2021-05-11 14:14:58 -07:00
thread_name.cpp c10/util/thread_name.cpp: pthread_setname_np requires Glibc 2.12 (#55063) 2021-05-21 10:26:51 -07:00
thread_name.h Canonicalize includes in c10, and add tests for it (#36299) 2020-04-10 12:07:52 -07:00
ThreadLocal.h Include Macros.h in ThreadLocal 2021-05-27 20:47:56 -07:00
ThreadLocalDebugInfo.cpp Disable avoid-non-const-global-variables lint check (#62008) 2021-07-22 18:04:40 -07:00
ThreadLocalDebugInfo.h Fix modernize-use-equals-default nolint failures in torch/csrcs (#61142) 2021-07-06 09:46:46 -07:00
Type_demangle.cpp [PyTorch] Split c10 Type.cpp into two files to allow targets to include one of them (#66445) 2021-10-11 21:52:24 -07:00
Type_no_demangle.cpp [PyTorch] Split c10 Type.cpp into two files to allow targets to include one of them (#66445) 2021-10-11 21:52:24 -07:00
Type.h Canonicalize includes in c10, and add tests for it (#36299) 2020-04-10 12:07:52 -07:00
TypeCast.cpp Avoid inlining error reporting in checked_convert (#66721) 2021-10-20 16:04:09 -07:00
TypeCast.h Always convert truthy booleans to 1 2022-06-07 16:00:30 +00:00
typeid.cpp Disable avoid-non-const-global-variables lint check (#62008) 2021-07-22 18:04:40 -07:00
typeid.h use irange for loops 2 (#66746) 2021-12-10 04:26:23 -08:00
TypeIndex.h [caffe2] don't use __FUNCSIG__ when building for Windows with clang (#70561) 2022-01-04 23:44:56 -08:00
TypeList.cpp
TypeList.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
TypeSafeSignMath.h Extend sign-compare warnings to gcc (take 2) 2022-04-13 00:06:52 +00:00
TypeTraits.cpp
TypeTraits.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
Unicode.cpp [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
Unicode.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
UniqueVoidPtr.cpp
UniqueVoidPtr.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00
Unroll.h Migrate nonzero from TH to ATen (CPU) (#59149) 2021-06-02 12:26:29 -07:00
variant.h Python Interface for Jiterator 2022-05-06 18:44:28 +00:00
win32-headers.h [PyTorch] Autoformat c10 (#56830) 2021-04-30 21:23:28 -07:00