CUDA works in version 8 but not in version 9. Is there a way to fix the problem in version 9? I've installed the latest CUDA from the official website https://developer.nvidia.com/cuda-downloads
This may happen because the CUDA resources downloaded are for version 8 and are not compatible with version 9. The problem can be fixed by re-installing them. To do this, evaluate the following in version 9:
The download is rather large, so it might take a while.