Skip to content

Instantly share code, notes, and snippets.

@InputBlackBoxOutput
Created March 12, 2023 17:27
Show Gist options
  • Save InputBlackBoxOutput/38491973dadd0cb1e1706148401788d7 to your computer and use it in GitHub Desktop.
Save InputBlackBoxOutput/38491973dadd0cb1e1706148401788d7 to your computer and use it in GitHub Desktop.
Check TPU version on Google Colab
import os
from tensorflow.python.profiler import profiler_client
tpu_profile_service_address = os.environ['COLAB_TPU_ADDR'].replace('8470', '8466')
print(profiler_client.monitor(tpu_profile_service_address, 100, 2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment