mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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
11 lines
195 B
C++
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
|