tensorflow gpu是否可用
(trackrcnn) zhuzhu@zhuzhu:~$ python
Python 3.6.7 |Anaconda, Inc.| (default, Oct 23 2018, 19:16:44)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> print(tf.test.is_gpu_available())
2020-09-22 15:27:34.003327: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2020-09-22 15:27:34.048450: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3492120000 Hz
2020-09-22 15:27:34.049110: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x55eb7e780a40 executing computations on platform Host. Devices:
2020-09-22 15:27:34.049142: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): <undefined>, <undefined>
2020-09-22 15:27:34.052315: E tensorflow/stream_executor/cuda/cuda_driver.cc:300] failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error
2020-09-22 15:27:34.052357: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:161] retrieving CUDA diagnostic information for host: zhuzhu
2020-09-22 15:27:34.052369: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:168] hostname: zhuzhu
2020-09-22 15:27:34.052408: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:192] libcuda reported version is: 450.57.0
2020-09-22 15:27:34.052442: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:196] kernel reported version is: 450.57.0
2020-09-22 15:27:34.052452: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:303] kernel version seems to match DSO: 450.57.0
重启电脑
(trackrcnn) zhuzhu@zhuzhu:~$ python
Python 3.6.7 |Anaconda, Inc.| (default, Oct 23 2018, 19:16:44)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> print(tf.test.is_gpu_available())
2020-09-22 15:37:05.040572: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2020-09-22 15:37:05.087254: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3492090000 Hz
2020-09-22 15:37:05.088152: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x55be28025760 executing computations on platform Host. Devices:
2020-09-22 15:37:05.088219: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): <undefined>, <undefined>
2020-09-22 15:37:05.224865: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0 with properties:
name: GeForce GTX 1080 major: 6 minor: 1 memoryClockRate(GHz): 1.8095
pciBusID: 0000:02:00.0
totalMemory: 7.92GiB freeMemory: 7.71GiB
2020-09-22 15:37:05.224925: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2020-09-22 15:37:05.225905: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-09-22 15:37:05.225926: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0
2020-09-22 15:37:05.225934: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0: N
2020-09-22 15:37:05.226043: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/device:GPU:0 with 7502 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080, pci bus id: 0000:02:00.0, compute capability: 6.1)
2020-09-22 15:37:05.228851: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x55be28745620 executing computations on platform CUDA. Devices:
2020-09-22 15:37:05.228872: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): GeForce GTX 1080, Compute Capability 6.1
True