Skip to content

Commit

Permalink
[RUNTIME] Use weak link for fp16 functions (apache#1769)
Browse files Browse the repository at this point in the history
  • Loading branch information
merrymercy authored and tqchen committed Sep 25, 2018
1 parent 72ad9a3 commit d59320c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/runtime/builtin_fp16.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit d59320c

Please sign in to comment.