Updated cuda layer based on test results