Skip to content

Commit 6b01aca

Browse files
Nicoshevfacebook-github-bot
authored andcommitted
Use hardware-accelerated float16 conversion
Summary: X-link: facebookresearch/FBGEMM#1310 Diff enables hardware-accelerated float to float16 casting Canary: https://www.internalfb.com/servicelab/experiment/5501471107/ Per-ad breakdown CPU time went down 1.91% Total CPU time went down 1.71% Differential Revision: D75728324
1 parent 60163c5 commit 6b01aca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/fbgemm/FbgemmFP16.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct TypeConverter<float16> {
3030
float16 operator()(float src) const {
3131
constexpr float FP16_MAX = 65504.f;
3232
const float fp16 = std::max(-FP16_MAX, std::min(src, FP16_MAX));
33-
return cpu_float2half_rn(fp16);
33+
return cpu_float2half(fp16);
3434
}
3535
};
3636

0 commit comments

Comments
 (0)