mockash
mockash

Reputation: 1360

How to know on which GPU tensorflow model is training on

I have installed tensorflow-gpu to train my models on GPU and have confirmed the installation from below.

import tensorflow as tf
tf.config.list_physical_devices()

#[PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU'),
# PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]

I started training an image classification model and I hope it runs on GPU automatically until and unless specified to run manually on a device. But while training the model I could see in my task manager that there were 2 GPU's and Intel Graphics card was GPU 0 and NVIDIA GeForce GTX1660Ti was GPU1. Does that mean tensorflow didn't detect my NVIDIA card or is it the actual GPU that was detected?

While training the model I could see that my NVIDIA GPU utilization was very low. Not sure on which device my model was trained.

enter image description here

Can someone clarify please.

Further version details. tf.__version__ (2.6.0), python 3.7, CUDA 11.4, cudnn 8.2

Upvotes: 1

Views: 1037

Answers (1)

Corralien
Corralien

Reputation: 120409

Try to enable debug:

tf.debugging.set_log_device_placement(True)

I think your Intel GPU is ignored by tf.config.list_physical_devices().

Upvotes: 1

Related Questions