1. 查看路径
1.1 查看cudnn
安装路径: which nvcc
s@s:~$ which nvcc
/usr/local/cuda-10.0/bin/nvcc
查看安装版本: nvcc --V 或则 nvcc --version
(base) song@s:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
(base) song@s:~$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
1.2 查看 pytorch
安装路径
(base) song@s:~$ python3
Python 3.7.11 (default, Jul 27 2021, 14:32:16)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.__file__)
/home/song/miniconda3/lib/python3.7/site-packages/torch/__init__.py
>>> import torchvision
>>> print(torchvision.__file__)
/home/song/miniconda3/lib/python3.7/site-packages/torchvision/__init__.py