[CUDA] More than one conversion function from "__half" to a built-in type applies:

Recently I have received the following:

cuda error: more than one conversion function from “__half” to a built-in type applies:
function “__half::operator float() const”
function “__half::operator short() const”
function “__half::operator unsigned short() const”
function “__half::operator int() const”
function “__half::operator unsigned int() const”
function “__half::operator long long() const”
function “__half::operator unsigned long long() const”
function “__half::operator __nv_bool() const”

It happens when I try to do mathematical operations with __half like left + right, assign = assign / 2.0 and so on …
It is very strange why I cannot use the following operations ? Why they are ambiguous ?
Maybe I missed some header file ?

2 Likes