查看cuda版本
dpkg -l | grep cuda
i libcudart11.0:amd64 11.5.117~11.5.1-1ubuntu1 amd64 NVIDIA CUDA Runtime Library
ii nvidia-cuda-dev:amd64 11.5.1-1ubuntu1 amd64 NVIDIA CUDA development files
ii nvidia-cuda-gdb 11.5.114~11.5.1-1ubuntu1 amd64 NVIDIA CUDA Debugger (GDB)
ii nvidia-cuda-toolkit 11.5.1-1ubuntu1 amd64 NVIDIA CUDA development toolkit
ii nvidia-cuda-toolkit-doc 11.5.1-1ubuntu1 all NVIDIA CUDA and OpenCL documentation
显示cuda是11.5
另外用命令
nvcc --version
显示的cuda版本也是11.5
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0
但是,我用另外一个命令,显示的cuda版本是12
nvidia-smi
Tue Jul 2 12:01:52 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.29.06 Driver Version: 545.29.06 CUDA Version: 12.3 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA RTX 2000 Ada Gene... Off | 00000000:01:00.0 On | N/A |
| N/A 39C P8 4W / 60W | 896MiB / 8188MiB | 7% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 5772 G /usr/lib/xorg/Xorg 431MiB |
| 0 N/A N/A 6265 G /usr/bin/gnome-shell 169MiB |
| 0 N/A N/A 48970 G ...seed-version=20240701-180127.641000 95MiB |
+---------------------------------------------------------------------------------------+
tensorflow keras软件包版本
https://www.tensorflow.org/api_docs/python/tf/keras
tensorflow和numpy版本
tensorflow 2.2.0
numpy 1.19.5