自己亲测有效的解决bug分享
报错显示
RuntimeError: CUDA error: CUBLAS_STATUS_NOT_SUPPORTED when calling cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)
解决:
在Linux终端输入命令
unset LD_LIBRARY_PATH
报错解决
如果没有解决,确定cuda和torch的版本匹配与否,可到官网查看版本是否匹配
cuda官网
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64pytorch官网
Previous PyTorch Versions | PyTorch Installing previous versions of PyTorch
https://pytorch.org/get-started/previous-versions/