Files
pytorch/c10/util/Bfloat16.cpp
Bin Bao cbefaf2a37 [AOTI] Move c10/util ostream function implementations to their headers (#123847)
Summary: AOTInductor generated code for CPU models may have direct reference to these c10-implemented data types, see _inductor/codegen/cpp_prefix.h. To make sure the AOTI generated code is ABI backward compatible, we need to change those headers to a header-only implementation. The next PR in this stack will add tests to use those data types without linking against libtorch.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/123847
Approved by: https://github.com/jansel
2024-04-19 00:51:24 +00:00

11 lines
195 B
C++

#include <c10/util/BFloat16.h>
#include <type_traits>
namespace c10 {
static_assert(
std::is_standard_layout_v<BFloat16>,
"c10::BFloat16 must be standard layout.");
} // namespace c10