Define float16::operator-() only for ROCm 5.0+
@@ -126,10 +126,14 @@ public:
return (__half_raw(data_).x & 0x8000u) != 0;
}
+#ifdef __HIPCC__ && HIP_VERSION >= 50000000
+
__device__ float16 operator-() {
return float16(-data_);
}
+#endif
+
template<typename T>
inline __device__ float16& operator+=(const T& rhs) {
*this = *this + rhs;
