I will try to install CUDA 10. It may have some difficulties because Debian only provides CUDA 9 in their official apt repository, and Nvidia website don’t have Debian CUDA package (only Ubuntu package).
Moreover, I think CUDA 9 should at least work? Why my code won’t work at all?