-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RUNTIME] Add fp16/fp32 conversion functions #1766
Conversation
Let us rename third_party to 3rdparty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some updated comments, please send a follow up pr
namespace tvm { | ||
namespace runtime { | ||
|
||
extern "C" uint16_t __gnu_f2h_ieee(float a) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Followup comment, we need to set it to be TVM_WEAK linkage so if user link compiler-rt, there will not be type conflict
|
||
#include <builtin_fp16.h> | ||
|
||
namespace tvm { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove namespace as they are not part of namespace
__gnu_h2f_ieee
and__gnu_f2h_ieee
to tvm runtime to support pre-compute fp16 related functions on x86. The implementation is adopted from compiler-rt.third_party
. We need to rungit submodule update --recursive
after update