Finish chi2 tests and GPU code.