diff --git a/src/runtime/builtin_fp16.cc b/src/runtime/builtin_fp16.cc index c259399e05e996103d6b5dd8c7a78de56f4a26bb..79c3cc474269be07e306a6946e66374e4ee2b9e5 100644 --- a/src/runtime/builtin_fp16.cc +++ b/src/runtime/builtin_fp16.cc @@ -5,17 +5,16 @@ */ #include <builtin_fp16.h> +#include <tvm/runtime/c_runtime_api.h> -namespace tvm { -namespace runtime { +extern "C" { -extern "C" uint16_t __gnu_f2h_ieee(float a) { +TVM_WEAK uint16_t __gnu_f2h_ieee(float a) { return __truncXfYf2__<float, uint32_t, 23, uint16_t, uint16_t, 10>(a); } -extern "C" float __gnu_h2f_ieee(uint16_t a) { +TVM_WEAK float __gnu_h2f_ieee(uint16_t a) { return __extendXfYf2__<uint16_t, uint16_t, 10, float, uint32_t, 23>(a); } -} // namespace runtime -} // namespace tvm +}