Skip to content
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

Merged
merged 4 commits into from
Sep 25, 2018
Merged

Conversation

merrymercy
Copy link
Member

  • Add __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.
  • Move third party dependencies to third_party. We need to run
    git submodule update --recursive after update

@tqchen
Copy link
Member

tqchen commented Sep 24, 2018

Let us rename third_party to 3rdparty

@tqchen tqchen merged commit bde5303 into apache:master Sep 25, 2018
Copy link
Member

@tqchen tqchen left a 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) {
Copy link
Member

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 {
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants