Tips and tricks on using Colab, Google Cloud Platform and TPUs

November 22, 2022 ยท View on GitHub

Authors: murphyk, mjsML, gerdm, summer 2021.

Random stuff

# 2x 2 chips (4 cores) per process:
os.environ["TPU_CHIPS_PER_HOST_BOUNDS"] = "1,2,1"
os.environ["TPU_HOST_BOUNDS"] = "1,1,1"
# Different per process:
os.environ["TPU_VISIBLE_DEVICES"] = "0,1" # Change to "2,3" for the second machine