问题解决:CUDA unkonwn error,changing env variable CUDA_VISIBLE_DEVICES

**Linux 下CUDA环境的bug:**cuda unknown error this may be due to an incorrectly set up environment ,changing env variable CUDA_VISIBLE_DEVICES after program start.Setting the available devices to be zero.

**解决方案:**在环境变量中添加CUDA的环境变量

  1. vim ~/.bashrc
  2. 最后一行添加export CUDA_VISIBLE_DEVICES=0
  3. 保存并退出

你可能感兴趣的:(CUDA,linux)