pytorch/c10/util
Scott Wolchok ade8fee512 Use c10 version of half/bfloat16 in executorch (#144111)
Summary:
X-link: https://github.com/pytorch/executorch/pull/7040

Accomplished by importing relevant files from c10 into
executorch/runtime/core/portable_type/c10, and then using `using` in
the top-level ExecuTorch headers. This approach should keep the
ExecuTorch build hermetic for embedded use cases. In the future, we
should add a CI job to ensure the c10 files stay identical to the
PyTorch ones.
ghstack-source-id: 260047850
exported-using-ghexport

Test Plan: builds

Differential Revision: D66106969

Pull Request resolved: https://github.com/pytorch/pytorch/pull/144111
Approved by: https://github.com/malfet
2025-02-08 22:40:14 +00:00
..
AbortHandler.h
accumulate.h
AlignOf.h
ApproximateClock.cpp [Profiler] Fix ASAN Overflow Issues (#140441) 2024-11-13 21:30:32 +00:00
ApproximateClock.h
Array.h
ArrayRef.h Fix & unit test for c10::ArrayRef constructed from user-defined types (#139758) 2024-11-06 04:23:05 +00:00
Backtrace.cpp
Backtrace.h
BFloat16-inl.h
BFloat16-math.h Remove is_reduced_floating_point from namespace std (#144502) 2025-01-10 03:24:10 +00:00
Bfloat16.cpp
BFloat16.h Remove C10_EMBEDDED (#144808) 2025-01-15 06:08:53 +00:00
bit_cast.h Use std::bit_cast as c10::bit_cast if available (#141035) 2024-11-19 20:43:45 +00:00
bits.h
Bitset.h
BUILD.bazel
build.bzl Use c10 version of half/bfloat16 in executorch (#144111) 2025-02-08 22:40:14 +00:00
C++17.cpp
C++17.h
CallOnce.h initialize device when pinning memory on this device, short circuit i… (#145752) 2025-01-30 21:37:29 +00:00
complex.h Move complex<Half> from Half.h to complex.h (#140565) 2024-11-18 15:56:21 +00:00
complex_math.cpp
complex_math.h
complex_utils.h
ConstexprCrc.h Use std::string_view (#145906) 2025-01-30 03:14:27 +00:00
copysign.h
DeadlockDetection.cpp
DeadlockDetection.h
Deprecated.h
DimVector.h
DynamicCounter.cpp Enable cppcoreguidelines-special-member-functions (#139132) 2024-11-06 13:42:20 +00:00
DynamicCounter.h
env.cpp Revert "[Environment Variable][6/N] Use thread-safe getenv functions (#140200)" 2024-11-13 15:33:23 +00:00
env.h
error.cpp Add missing explicit include directive for <cerrno> in c10/util/error… (#141593) 2024-11-27 00:00:23 +00:00
error.h Add and use thread-safe strerror (#140472) 2024-11-19 04:24:17 +00:00
Exception.cpp
Exception.h [BE] Introduce c10::SyntaxError (#144647) 2025-01-12 23:23:54 +00:00
ExclusivelyOwned.h
ExclusivelyOwnedTensorTraits.h
FbcodeMaps.h
Flags.h [18/N] Fix extra warnings brought by clang-tidy-17 (#144014) 2025-01-08 17:21:55 +00:00
flags_use_gflags.cpp
flags_use_no_gflags.cpp
flat_hash_map.h
Float8_e4m3fn-inl.h
Float8_e4m3fn.cpp
Float8_e4m3fn.h [ROCm][Windows] Fix unrecognized _BitScanReverse intrinsic (#146606) 2025-02-06 23:47:18 +00:00
Float8_e4m3fnuz-inl.h
Float8_e4m3fnuz.cpp
Float8_e4m3fnuz.h
Float8_e5m2-inl.h
Float8_e5m2.cpp
Float8_e5m2.h
Float8_e5m2fnuz-inl.h
Float8_e5m2fnuz.cpp
Float8_e5m2fnuz.h
Float8_fnuz_cvt.h
floating_point_utils.h Remove UB type punning from c10/util/floating_point_utils.h (#140567) 2024-11-18 18:41:34 +00:00
FunctionRef.h
Gauge.cpp
Gauge.h
generic_math.h Fix PythonMod printing for C++ (#143385) 2025-01-22 14:58:35 +00:00
Half-inl.h
Half.cpp
Half.h Remove C10_EMBEDDED (#144808) 2025-01-15 06:08:53 +00:00
hash.h
IdWrapper.h
int128.cpp
int128.h
intrusive_ptr.cpp
intrusive_ptr.h
irange.h
Lazy.h
LeftRight.cpp
LeftRight.h Enable more readability-redundant checks (#143963) 2024-12-30 14:49:33 +00:00
llvmMathExtras.h
Load.h [2/N] Enable UBSAN tests (#141740) 2024-12-03 20:52:26 +00:00
Logging.cpp [3/N] Remove unnecessary once flag usage (#145672) 2025-01-28 04:28:18 +00:00
Logging.h
logging_is_google_glog.h
logging_is_not_google_glog.h
MathConstants.cpp
MathConstants.h
MaybeOwned.h
Metaprogramming.cpp
Metaprogramming.h
NetworkFlow.cpp Switch c10::string_view to std::string_view (#139635) 2024-11-27 01:41:18 +00:00
NetworkFlow.h
numa.cpp
numa.h
Optional.cpp
Optional.h Disable c10::optional macros (#138912) 2024-12-17 09:22:47 +00:00
OptionalArrayRef.h Enable bugprone-unchecked-optional-access (#144226) 2025-01-10 03:16:56 +00:00
order_preserving_flat_hash_map.h Enable cppcoreguidelines-special-member-functions (#139132) 2024-11-06 13:42:20 +00:00
overflows.h move c10::overflows to its own header (#140564) 2024-11-18 15:56:21 +00:00
overloaded.h
ParallelGuard.cpp
ParallelGuard.h
python_stub.h
qint8.h
qint32.h
quint2x4.h
quint4x2.h
quint8.h
Registry.h
safe_numerics.h
ScopeExit.h
signal_handler.cpp Enable more readability-redundant checks (#143963) 2024-12-30 14:49:33 +00:00
signal_handler.h
SmallBuffer.h
SmallVector.cpp
SmallVector.h
sparse_bitset.h
ssize.h
static_tracepoint.h
static_tracepoint_elfx86.h Flag TORCH_SDT_SEMAPHORE as being name resovable (#141191) 2024-11-23 01:39:44 +00:00
strides.h
string_utils.h
string_view.h Switch c10::string_view to std::string_view (#139635) 2024-11-27 01:41:18 +00:00
StringUtil.cpp c10::string_view -> std::string_view in more places (#142517) 2024-12-12 19:45:59 +00:00
StringUtil.h Use std::string_view (#145906) 2025-01-30 03:14:27 +00:00
strong_type.h
Synchronized.h
tempfile.cpp Add and use thread-safe strerror (#140472) 2024-11-19 04:24:17 +00:00
tempfile.h
thread_name.cpp
thread_name.h
ThreadLocal.h
ThreadLocalDebugInfo.cpp
ThreadLocalDebugInfo.h
Type.h
Type_demangle.cpp
Type_no_demangle.cpp
TypeCast.cpp
TypeCast.h move c10::overflows to its own header (#140564) 2024-11-18 15:56:21 +00:00
typeid.cpp
typeid.h c10::string_view -> std::string_view in pytorch (#143591) 2025-01-13 21:44:05 +00:00
TypeIndex.h Switch c10::string_view to std::string_view (#139635) 2024-11-27 01:41:18 +00:00
TypeList.cpp
TypeList.h
TypeSafeSignMath.h
TypeTraits.cpp
TypeTraits.h
Unicode.cpp
Unicode.h
UniqueVoidPtr.cpp
UniqueVoidPtr.h
Unroll.h
WaitCounter.cpp
WaitCounter.h
WaitCounterDynamicBackend.h
win32-headers.h