| 144 | } |
| 145 | |
| 146 | static float bf16_to_float(uint16_t bf16) { |
| 147 | uint32_t bits = (uint32_t)bf16 << 16; |
| 148 | float f; |
| 149 | std::memcpy(&f, &bits, sizeof(f)); |
| 150 | return f; |
| 151 | } |
| 152 | |
| 153 | static inline fp16_t float_to_fp16(float x) { |
| 154 | #if defined(__AVX2__) |
no outgoing calls
no test coverage detected