Environment CUDA version: 10.2 Tensorflow: 2.2.0
$ nvidia-smi
Mon Nov 16 11:59:35 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.95.01 Driver Version: 440.95.01 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1080 Off | 00000000:01:00.0 Off | N/A |
| 0% 54C P0 40W / 180W | 0MiB / 8116MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89
Check if tensorflow can detect the GPU
>>> import tensorflow as tf;print(tf.__version__)
2.2.0
>>> tf.test.gpu_device_name()
''
>>> from tensorflow.python.client import device_lib; print(device_lib.list_local_devices())
2020-11-16 11:51:17.480346: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2020-11-16 11:51:17.498691: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 3999980000 Hz
2020-11-16 11:51:17.499204: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55b39f4a2b20 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-11-16 11:51:17.499232: 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: 5465609901031465818
, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
}
incarnation: 15084457781891957405
physical_device_desc: "device: XLA_CPU device"
]
$ python en_rcnn.py
Num GPUs Available: 0
en_rcnn.py:33: DeprecationWarning: Call to deprecated `syn0` (Attribute will be removed in 4.0.0, use self.vectors instead).
MAX_TOKENS = word2vec.wv.syn0.shape[0]
en_rcnn.py:47: DeprecationWarning: Call to deprecated `syn0` (Attribute will be removed in 4.0.0, use self.vectors instead).
embedding_dim = word2vec.wv.syn0.shape[1]
en_rcnn.py:48: DeprecationWarning: Call to deprecated `syn0` (Attribute will be removed in 4.0.0, use self.vectors instead).
embeddings = np.zeros((MAX_TOKENS + 2, word2vec.wv.syn0.shape[1]), dtype = "float32")
en_rcnn.py:49: DeprecationWarning: Call to deprecated `syn0` (Attribute will be removed in 4.0.0, use self.vectors instead).
embeddings[:MAX_TOKENS] = word2vec.wv.syn0
2020-11-16 11:45:06.600915: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2020-11-16 11:45:06.615834: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 3999980000 Hz
2020-11-16 11:45:06.616030: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55b31a39e570 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-11-16 11:45:06.616045: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2020-11-16 11:45:06.616104: I tensorflow/core/common_runtime/process_util.cc:147] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.
Epoch 1/10
for versions older than 1.5, gpu packages seem to be separate. But for newer versions, it's a single package.
Source: https://www.tensorflow.org/install/gpu
But after trying with 'pip install tensorflow-gpu' #This installed tensorflow 2.3.1 version