From d59320c764bd09474775e1b292f3c05c27743d24 Mon Sep 17 00:00:00 2001 From: Lianmin Zheng <mercy_zheng@sjtu.edu.cn> Date: Tue, 25 Sep 2018 12:15:15 -0700 Subject: [PATCH] [RUNTIME] Use weak link for fp16 functions (#1769) --- src/runtime/builtin_fp16.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/runtime/builtin_fp16.cc b/src/runtime/builtin_fp16.cc index c259399e0..79c3cc474 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 +} -- GitLab