跑代码报错:RuntimeError: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW
解决办法:NVIDIA 显卡驱动更新,显示驱动与cuda版本不兼容。使用nvidia-smi命令行查看相关版本信息,显示如下:
重启服务器,已正常运行。