I didn’t see this posted, but we all must see that there are numerous compiler warnings from c10, aten and others (at least on windows). The c++ api tests work, so I guess these are harmless, but it makes finding warnings and errors in my code challenging. Since I’m not a pro, can I ask in this forum about some possible edits that I would like to make to get rid of these?
For example:
all the Half operators have the form
inline C10_HOST_DEVICE Half operator op(Half a, int b)
{
 return a op static_cast<Half>(b);
}

This seems to construct a Half object by calling Half(b). But, there is no Half constructor taking an int. As a result b is implicitly cast to float: Half((float)b). This causes a C4244 warning conversion from ‘int’ to ‘float’, possible loss of data
I’m not sure the authors intent, but would this cause any problems to other parts of the library (or is there a better fix)? For example can I cast b to an unsigned short directly without causing problems?
inline C10_HOST_DEVICE Half operator op(Half a, int b)
{
 return a op static_cast<Half>( static_cast<float>b );
}