Issue 9631: Tf1.14 does not have tf.config.list_physical_devices. (#9681)

This commit is contained in:
Sven Mika 2020-07-24 21:48:58 +02:00 committed by GitHub
parent a078a21437
commit e4c5d3526f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -412,7 +412,7 @@ class RolloutWorker(ParallelIteratorWorker):
worker_index) +
" on CPU (please ignore any CUDA init errors)")
elif (policy_config["framework"] in ["tf2", "tf", "tfe"] and
not tf.config.list_physical_devices("GPU")) or \
not tf.config.experimental.list_physical_devices("GPU")) or \
(policy_config["framework"] == "torch" and
not torch.cuda.is_available()):
raise RuntimeError(