nvcc -V can use normal,but I cannot run the demo (just like “deviceQuery.exe” and so on) rightly.And this is my situation:
(tf3.8) C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\demo_suite>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:26_Pacific_Standard_Time_2019
Cuda compilation tools, release 10.1, V10.1.105
(tf3.8) C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\demo_suite>nvidia-smi
Tue Jun 6 10:20:41 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.98 Driver Version: 535.98 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | 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 4080 WDDM | 00000000:01:00.0 On | N/A |
| 0% 30C P8 11W / 320W | 590MiB / 16376MiB | 6% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 992 C+G ...cent\QQGuild\1.3.24-195\QQGuild.exe N/A |
| 0 N/A N/A 10896 C+G ...inaries\Win64\EpicGamesLauncher.exe N/A |
| 0 N/A N/A 11340 C+G ...crosoft\Edge\Application\msedge.exe N/A |
| 0 N/A N/A 11432 C+G C:\Windows\explorer.exe N/A |
| 0 N/A N/A 13844 C+G ....Search_cw5n1h2txyewy\SearchApp.exe N/A |
| 0 N/A N/A 15536 C+G ...ne\Binaries\Win64\EpicWebHelper.exe N/A |
| 0 N/A N/A 15592 C+G ...CBS_cw5n1h2txyewy\TextInputHost.exe N/A |
| 0 N/A N/A 17504 C+G ...siveControlPanel\SystemSettings.exe N/A |
| 0 N/A N/A 18192 C+G ...GeForce Experience\NVIDIA Share.exe N/A |
+---------------------------------------------------------------------------------------+
(tf3.8) C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\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
(tf3.8) C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\demo_suite>bandwidthTest.exe
[CUDA Bandwidth Test] - Starting...
Running on...
cudaGetDeviceProperties returned 100
-> no CUDA-capable device is detected
CUDA error at C:/dvs/p4/build/sw/rel/gpgpu/toolkit/r10.1/demo_suite/bandwidthTest/bandwidthTest.cu:255 code=100(cudaErrorNoDevice) "cudaSetDevice(currentDevice)"
and python cannot find GPU:
(tf3.8) D:\TFenv>python
Python 3.8.16 (default, Mar 2 2023, 03:18:16) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
2023-06-06 09:53:40.843735: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
>>> tf.__version__()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'str' object is not callable
>>> tf.__version__
'2.3.0'
>>> tf.config.list_physical_devices('GPU')
2023-06-06 09:53:59.713062: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library nvcuda.dll
2023-06-06 09:53:59.719204: E tensorflow/stream_executor/cuda/cuda_driver.cc:314] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2023-06-06 09:53:59.721079: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: forMyUnion
2023-06-06 09:53:59.721374: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: forMyUnion
[]
>>> from tensorflow.python.client import device_lib
>>> device_lib.list_local_devices()
2023-06-06 09:54:44.943108: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-06-06 09:54:44.948756: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x13ed7d00330 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2023-06-06 09:54:44.948852: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 13959960267344122449
, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
}
incarnation: 4748881427766356091
physical_device_desc: "device: XLA_CPU device"
]
>>> exit()
my virtual env is:
(tf3.8) C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\demo_suite>pip list
Package Version
------------------------ --------
absl-py 1.4.0
astunparse 1.6.3
boltons 23.0.0
brotlipy 0.7.0
cachetools 5.3.1
certifi 2023.5.7
cffi 1.15.1
charset-normalizer 3.1.0
colorama 0.4.6
conda 23.5.0
conda-package-handling 2.1.0
conda_package_streaming 0.8.0
cryptography 39.0.1
gast 0.3.3
google-auth 2.19.1
google-auth-oauthlib 1.0.0
google-pasta 0.2.0
grpcio 1.54.2
h5py 2.10.0
idna 3.4
importlib-metadata 6.6.0
jsonpatch 1.32
jsonpointer 2.1
Keras-Preprocessing 1.1.2
Markdown 3.4.3
MarkupSafe 2.1.3
menuinst 1.4.19
numpy 1.18.5
oauthlib 3.2.2
opt-einsum 3.3.0
packaging 23.0
pip 23.0.1
pluggy 1.0.0
protobuf 4.23.2
pyasn1 0.5.0
pyasn1-modules 0.3.0
pycosat 0.6.4
pycparser 2.21
pyOpenSSL 23.0.0
PySocks 1.7.1
requests 2.31.0
requests-oauthlib 1.3.1
rsa 4.9
ruamel.yaml 0.17.21
ruamel.yaml.clib 0.2.6
scipy 1.4.1
setuptools 67.8.0
six 1.16.0
tensorboard 2.13.0
tensorboard-data-server 0.7.0
tensorflow-gpu 2.3.0
tensorflow-gpu-estimator 2.3.0
termcolor 2.3.0
toolz 0.12.0
tqdm 4.65.0
urllib3 1.26.16
Werkzeug 2.3.4
wheel 0.38.4
win-inet-pton 1.1.0
wrapt 1.15.0
zipp 3.15.0
zstandard 0.19.0