Whether we are using Google Colab or accessing Cloud TPUs directly, the below program gives only limited information about the underlying TPUs:
import os
import tensorflow as tf
tpu_address = 'grpc://' + os.environ['COLAB_TPU_ADDR']
print ('TPU address is', tpu_address)
def printTPUDevices():
with tf.Session(tpu_address) as session:
devices = session.list_devices()
print ('TPU devices:')
return devices
printTPUDevices()
Is there any documentation of programmatically or via bash commands to display more information, see this gist for e.g. https://gist.github.com/neomatrix369/256913dcf77cdbb5855dd2d7f5d81b84.