##torch工程依赖包以及安装顺序:torch、torchvision、torch_baidu_ctc
torch-1.1.0-cp36-cp36m-manylinux1_x86_64.whl
torchvision-0.3.0-cp36-cp36m-manylinux1_x86_64.whl
torch_baidu_ctc-0.1.1-cp36-cp36m-manylinux1_x86_64.whl
###torch其他依赖
Collecting pybind11 (from torch-baidu-ctc==0.1.1)
pybind11-2.3.0
##可能会需要用到webpy-webpy-webpy-0.38.tar.gz
##验证GPU是否可用
import torch
torch.cuda.is_available()
若结果出现False,表明未使用GPU资源
###参考文档
https://blog.youkuaiyun.com/sunqiande88/article/details/80085569
###优先考虑在https://pypi.org/下载与cuda匹配的安装包,可先参考pytorch官网
##pytorch官网
https://pytorch.org/
##GitHub官网
https://github.com/pytorch
##参考资料:https://www.cnblogs.com/yhjoker/p/10972795.html
##查看cuda版本
cat /usr/local/cuda/version.txt
##CUDA Version 9.0.176
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 2
#define CUDNN_PATCHLEVEL 1
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
#include "driver_types.h"
#####
import torch
print(torch.version.cuda)
torch.cuda.is_available()
torch.backends.cudnn.enabled
import torch.utils
import torch.utils.cpp_extension
torch.utils.cpp_extension.CUDA_HOME
##查看环境变量
/etc/profile
##查看系统版本
uname -a