residuals work on gpu