cast INPLACE ops to keep dtype