diff --git a/src/runtime/builtin_fp16.cc b/src/runtime/builtin_fp16.cc index 2a8ff799ddb1..60dc55d8c24a 100644 --- a/src/runtime/builtin_fp16.cc +++ b/src/runtime/builtin_fp16.cc @@ -37,5 +37,15 @@ TVM_DLL TVM_WEAK float __gnu_h2f_ieee(uint16_t a) { return __extendXfYf2__(a); } +#else + +TVM_DLL uint16_t __gnu_f2h_ieee(float a) { + return __truncXfYf2__(a); +} + +TVM_DLL float __gnu_h2f_ieee(uint16_t a) { + return __extendXfYf2__(a); +} + #endif }