Don't double-define Half functions on aarch64

(cherry picked from commit 66ea0c09fdd939ae2741cee1f5a9961b64d5adcd)
This commit is contained in:
Lexi Bromfield 2022-08-09 20:00:34 +00:00 committed by Antonio Sanchez
parent a9490cd3c5
commit 33a602eb37

View File

@ -332,7 +332,7 @@ EIGEN_STRONG_INLINE __device__ bool operator >= (const half& a, const half& b) {
}
#endif
#if defined(EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC)
#if defined(EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC) && !defined(EIGEN_GPU_COMPILE_PHASE)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator + (const half& a, const half& b) {
return half(vaddh_f16(a.x, b.x));
}