Skip to content

Commit

Permalink
Address issue apache#6415 using compiler-rt half-float function. (apa…
Browse files Browse the repository at this point in the history
  • Loading branch information
cbalint13 authored and kevinthesun committed Sep 17, 2020
1 parent ec667d5 commit c22df4c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/relay/transforms/pattern_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,10 @@ static inline long double ToScalar(const runtime::NDArray& array, size_t i = 0)
return reinterpret_cast<uint64_t*>(array->data)[i];
}
} else if (array->dtype.code == kDLFloat) {
#if (__ARM_FP16_FORMAT_IEEE == 1)
if (array->dtype.bits == 16) {
return reinterpret_cast<__fp16*>(array->data)[i];
return __extendXfYf2__<uint16_t, uint16_t, 10, float, uint32_t, 23>(
reinterpret_cast<uint16_t*>(array->data)[i]);
}
#endif
if (array->dtype.bits == 32) {
return reinterpret_cast<float*>(array->data)[i];
} else if (array->dtype.bits == 64) {
Expand Down

0 comments on commit c22df4c

Please sign in to comment.