Skip to content

Commit

Permalink
export builtin_fp16 on Windows (apache#4731)
Browse files Browse the repository at this point in the history
  • Loading branch information
vexilligera authored and zhiics committed Mar 2, 2020
1 parent 4e44db4 commit 823b1ae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/runtime/builtin_fp16.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,15 @@ TVM_DLL TVM_WEAK float __gnu_h2f_ieee(uint16_t a) {
return __extendXfYf2__<uint16_t, uint16_t, 10, float, uint32_t, 23>(a);
}

#else

TVM_DLL uint16_t __gnu_f2h_ieee(float a) {
return __truncXfYf2__<float, uint32_t, 23, uint16_t, uint16_t, 10>(a);
}

TVM_DLL float __gnu_h2f_ieee(uint16_t a) {
return __extendXfYf2__<uint16_t, uint16_t, 10, float, uint32_t, 23>(a);
}

#endif
}

0 comments on commit 823b1ae

Please sign in to comment.