Commit a61aa740 authored by fsx950223's avatar fsx950223
Browse files

simplified formula

parent daebef99
...@@ -979,7 +979,7 @@ inline __host__ __device__ constexpr bhalf_t type_convert<bhalf_t, float>(float ...@@ -979,7 +979,7 @@ inline __host__ __device__ constexpr bhalf_t type_convert<bhalf_t, float>(float
uint16x2_t int32; uint16x2_t int32;
} u = {x}; } u = {x};
return u.int32.y + ((u.int32.x & 0x8000) >> 15); return u.int32.y + (u.int32.x >> 15);
} }
// convert fp16 to bf16 // convert fp16 to bf16
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment