Lots of effort to get CUDA unit testing working.