I have seen the question multiple times but never got a straight forward answer. In one node of our cluster we have 7 gpus. I want to use two specific gpus in tensorflow2, say GPU 3 and GPU 5. How do I select these two GPUs?
I have tried:
physical_devices = tf.config.list_physical_devices('GPU')
tf.config.set_visible_devices([physical_devices[3],physical_devices[5]],'GPU')
Still it is using GPU 0 and I am getting error because someone else is already using it.
If parallel use could be an issue, please suggest me how to use a specific one, say GPU 3? And how will I check that only GPU 3 is being used?