[PATCH] Fix undefined __floatdihf in libtvmruntime.so on aarch64. (#4119)
authorlhutton1 <35535092+lhutton1@users.noreply.github.com>
Thu, 17 Oct 2019 17:05:10 +0000 (18:05 +0100)
committerTianqi Chen <tqchen@users.noreply.github.com>
Thu, 17 Oct 2019 17:05:10 +0000 (10:05 -0700)
commitcf046972eb5602c2d1b67edea230f6ca07c966b1
tree3e9a27a6fc92968d1d91f2c04912712f00feeaa9
parenta8a983176dfe41506458b628e7666dd0a6347807
[PATCH] Fix undefined __floatdihf in libtvmruntime.so on aarch64. (#4119)

Arm architecture provides optional FP16 floating point support in two alternative formats, IEEE and an an alternative Arm format.

The ACLE (Arm C Language Extension) defined preprocessor symbol __ARM_FP16_FORMAT_IEEE can be used to distinguish between implementations providing IEEE and the Arm alternative format, but cannot, on its own, be used to determined if FP16 HW support is actually present.

Testing this preprocessor symbol can lead to undefined __floatdihf at runtime on an aarch64 target where no FP16 HW is present.

The relevant preprocessor symbol to determine whether FP16 HW support is present in the target is __ARM_FEATURE_FP16_SCALAR_ARITHMETIC, this symbol implies  __ARM_FP16_FORMAT_IEEE.

The relevant preprocessor symbols are defined by the ACLE standard, section 5.5.21 16-bit floating-point data processing operations, https://static.docs.arm.com/101028/0008/Q2-ACLE_2019Q2_release-0008.pdf
src/contrib/sort/sort.cc