mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
Summary: …d symbol errors when building in DEBUG mode. Pull Request resolved: https://github.com/pytorch/pytorch/pull/17661 Differential Revision: D14319610 Pulled By: soumith fbshipit-source-id: 6c508a37155e29260f403d7174f343aa1ff32385
16 lines
291 B
C++
16 lines
291 B
C++
#include <c10/util/Half.h>
|
|
|
|
#include <iostream>
|
|
|
|
namespace c10 {
|
|
|
|
static_assert(
|
|
std::is_standard_layout<Half>::value,
|
|
"c10::Half must be standard layout.");
|
|
|
|
std::ostream& operator<<(std::ostream& out, const Half& value) {
|
|
out << (float)value;
|
|
return out;
|
|
}
|
|
|
|
} // namespace c10
|