问题:运行demo的时候出现检测不到GPU的情况
```bash
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\extras\demo_suite>deviceQuery.exe
deviceQuery.exe Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 100
-> no CUDA-capable device is detected
Result = FAIL
驱动和CUDA配置:
```bash
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Feb_27_16:28:36_Pacific_Standard_Time_2024
Cuda compilation tools, release 12.4, V12.4.99
Build cuda_12.4.r12.4/compiler.33961263_0
Wed Mar 19 08:19:34 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 572.70 Driver Version: 572.70 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Driver-Model | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4070 ... WDDM | 00000000:01:00.0 On | N/A |
| 0% 25C P8 11W / 285W | 447MiB / 16376MiB | 2% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
使用torch时:
>python
Python 3.11.11 | packaged by Anaconda, Inc. | (main, Dec 11 2024, 16:34:19) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
False
>>>
GPU占用情况补充:
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 4568 C+G ...__8wekyb3d8bbwe\onenoteim.exe N/A |
| 0 N/A N/A 6560 C+G ....0.3124.72\msedgewebview2.exe N/A |
| 0 N/A N/A 10320 C+G ...y\StartMenuExperienceHost.exe N/A |
| 0 N/A N/A 10408 C+G ..._cw5n1h2txyewy\SearchHost.exe N/A |
| 0 N/A N/A 10664 C+G ...ao\Application\app\Doubao.exe N/A |
| 0 N/A N/A 11668 C+G ...yb3d8bbwe\WindowsTerminal.exe N/A |
| 0 N/A N/A 15808 C+G ...ntrolPanel\SystemSettings.exe N/A |
| 0 N/A N/A 16028 C+G ...t\Edge\Application\msedge.exe N/A |
| 0 N/A N/A 17008 C+G ...crosoft\OneDrive\OneDrive.exe N/A |
| 0 N/A N/A 17132 C+G ...em32\ApplicationFrameHost.exe N/A |
| 0 N/A N/A 17352 C+G ...t\Edge\Application\msedge.exe N/A |
| 0 N/A N/A 18320 C+G ...xyewy\ShellExperienceHost.exe N/A |
| 0 N/A N/A 22512 C+G ...yb3d8bbwe\Notepad\Notepad.exe N/A |
| 0 N/A N/A 22776 C+G C:\Windows\explorer.exe N/A |
| 0 N/A N/A 23160 C+G ...App_cw5n1h2txyewy\LockApp.exe N/A |
| 0 N/A N/A 25300 C+G ...8bbwe\PhoneExperienceHost.exe N/A |
| 0 N/A N/A 26740 C+G ...indows\System32\ShellHost.exe N/A |
| 0 N/A N/A 27328 C+G ...5n1h2txyewy\TextInputHost.exe N/A |
+-----------------------------------------------------------------------------------------+