mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Still a continued work for clean up c10/util/*.h Pull Request resolved: https://github.com/pytorch/pytorch/pull/116326 Approved by: https://github.com/Skylion007
16 lines
343 B
C++
16 lines
343 B
C++
#include <c10/util/Float8_e4m3fn.h>
|
|
#include <iostream>
|
|
#include <type_traits>
|
|
|
|
namespace c10 {
|
|
|
|
static_assert(
|
|
std::is_standard_layout_v<Float8_e4m3fn>,
|
|
"c10::Float8_e4m3fn must be standard layout.");
|
|
|
|
std::ostream& operator<<(std::ostream& out, const Float8_e4m3fn& value) {
|
|
out << (float)value;
|
|
return out;
|
|
}
|
|
} // namespace c10
|