MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / BFloat16ToFloat

Function BFloat16ToFloat

tensorflow/core/framework/bfloat16.cc:34–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void BFloat16ToFloat(const bfloat16* src, float* dst, int64 size) {
35 const uint16_t* p = reinterpret_cast<const uint16_t*>(src);
36 uint16_t* q = reinterpret_cast<uint16_t*>(dst);
37#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
38 for (; size != 0; p++, q += 2, size--) {
39 q[0] = *p;
40 q[1] = 0;
41 }
42#else
43 for (; size != 0; p++, q += 2, size--) {
44 q[0] = 0;
45 q[1] = *p;
46 }
47#endif
48}
49
50} // end namespace tensorflow

Callers 5

Tensor2ResponseFunction · 0.85
TESTFunction · 0.85
BM_BFloat16ToFloatFunction · 0.85
ComputeMethod · 0.85
ComputeMethod · 0.85

Calls

no outgoing calls

Tested by 2

TESTFunction · 0.68
BM_BFloat16ToFloatFunction · 0.68