vexilligera opened a new issue #4726: Export builtin_fp16 functions on Windows
URL: https://github.com/apache/incubator-tvm/issues/4726
 
 
   Hello, MXNet is working on tests involving TVMOps on Windows. When 
generating libtvmop.dll on Windows, the symbols of two functions required by 
tvmop.dll are missing. Can we export these two functions on Windows as well? 
The following code (src/runtime/builtin_fp16.cc) seems to work well for me.
   
   `
   #include <builtin_fp16.h>
   #include <tvm/runtime/c_runtime_api.h>
   
   extern "C" {
   
   // disable under msvc
   #ifndef _MSC_VER
   
   TVM_DLL TVM_WEAK uint16_t __gnu_f2h_ieee(float a) {
     return __truncXfYf2__<float, uint32_t, 23, uint16_t, uint16_t, 10>(a);
   }
   
   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
   }
   `

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to