[WIP] Fix CUDA assignment

Some of the recent changes broke CUDA assignment completely.