my env configuration:
keras==2.3.1, tensorflow-GPU==2.2.0
I try to support multi-GPUs in one machcine, so I add simple code as below to include all model related codes:
strategy = tf.distribute.MirroredStrategy()
print('Number of devices: {}'.format(strategy.num_replicas_in_sync))
with strategy.scope():
xxx xxx
xxx xxx
I also try to set os.environ['TF_KERAS'] to "0" or "1".
I can see the process in two GPUs, but the last GPU-Util is always 0% as below:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.00 Driver Version: 418.87.00 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla P40 Off | 00000000:00:0E.0 Off | 0 |
| N/A 40C P0 155W / 250W | 21699MiB / 22919MiB | 100% Default |
+-------------------------------+----------------------+----------------------+
| 1 Tesla P40 Off | 00000000:00:0F.0 Off | 0 |
| N/A 31C P0 49W / 250W | 21659MiB / 22919MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
so what else need I do if I want to train in multi-GPUs???