

Print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU'))) SetupĮnsure you have the latest TensorFlow gpu release installed. To learn how to debug performance issues for single and multi-GPU scenarios, see the Optimize TensorFlow GPU Performance guide. This guide is for users who have tried these approaches and found that they need fine-grained control of how TensorFlow uses the GPU. The simplest way to run on multiple GPUs, on one or many machines, is using Distribution Strategies. Note: Use tf.config.list_physical_devices('GPU') to confirm that TensorFlow is using the GPU. TensorFlow code, and tf.keras models will transparently run on a single GPU with no code changes required.
