<commit_before>/*!
 * Copyright (c) 2018 by Contributors
 * \file builtin_fp16.cc
 * \brief Functions for conversion between fp32 and fp16
*/

#include <builtin_fp16.h>

namespace tvm {
namespace runtime {

extern "C"  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) {
  return __extendXfYf2__<uint16_t, uint16_t, 10, float, uint32_t, 23>(a);
}

}  // namespace runtime
}  // namespace tvm<commit_msg>[RUNTIME] Use weak link for fp16 functions  (#1769)<commit_after>/*!
 * Copyright (c) 2018 by Contributors
 * \file builtin_fp16.cc
 * \brief Functions for conversion between fp32 and fp16
*/

#include <builtin_fp16.h>
#include <tvm/runtime/c_runtime_api.h>

extern "C" {

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

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

}
{'fraction_non_alphanumeric': 0.12023460410557185, 'fraction_numerical': 0.08406647116324535, 'mean_word_length': 4.988304093567251, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '636674', 'n_tokens_mistral': 487, 'n_tokens_neox': 427, 'n_words': 100}