Questions tagged [google-cloud-tpu]

Google Cloud TPUs (Tensor Processing Units) accelerate machine learning workloads developed using TensorFlow. This tag is used for questions about using the Google Cloud TPU service. Topics can range from the service user experience, issues with the trainer program written with Tensorflow, project quota issues, security, authentication, etc.

Official website

188 questions
0
votes
2 answers

How to detach a disk in a Google Cloud TPU VM instance?

I created a TPU-VM instance (not a normal compute instance) and attach an external disk to it using this command: gcloud alpha compute tpus tpu-vm create TPU-VM-NAME \ --zone=europe-west4-a \ --accelerator-type=v3-8 \ --version=v2-alpha \ …
0
votes
1 answer

Extremely slow when saving model on Colab TPU

my situation is that saving model is extremely slow under Colab TPU environment. I first encountered this issue when using checkpoint callback, which causes the training stuck at the end of the 1st epoch. Then, I tried taking out callback and just…
sealpuppy
  • 615
  • 4
  • 12
  • 27
0
votes
0 answers

How to use TPU on LSTM?

I am trying to use TPU in colab to speed up the training process of LSTM. But I am keep getting the error: Unable to find the relevant tensor remote_handle: Op ID: 529, Output num: 0 The code and data link are shared below, can anyone please help me…
0
votes
1 answer

Stream private data to google collab TPUs from GCS

So I'm trying to make a photo classifier with 150 classes. I'm trying to run it on google colab TPUs, I understood I need a tfds with try_gcs = True for it & for that I need to put a dataset on google colab cloud. So I converted a generator to a…
0
votes
1 answer

How to find TPU name and zone in Google Colab?

I am trying to run a code that requires tpu name and zone in config. Using a TPU runtime, how can I find the TPU name and zone in Google Colab?
user1340852
  • 825
  • 3
  • 9
  • 27
0
votes
1 answer

Is there a way for dynamic N-times replication of a tensor in Tensorflow custom layer (on TPU)?

I'm trying to solve quite a simple task (I thought it to be), which is replicating a tensor in custom layer on TPU. My input is 2 tensors of shapes A=(BS, H, n, C) and B = (BS, n, W, C), where n in my case can be (1, 3, 5, 7), but should probably…
0
votes
1 answer

UnimplementedError while using TensoBoard with TPU

I am currently training my model with the TPU. Unfortunately, I get an X error when using TensoBoard and the TPU. If I only use the TPU then everything works. If I use GPU and TensorBoard, everything works too. I use google…
user14253628
0
votes
2 answers

Error when opening tpus page on google cloud console

When I opened the URL "https://console.cloud.google.com/compute/tpus?project=..." I get the error below "There was an error while loading /compute/tpus?folder=&project=.... Please try again. Request ID: ...". There is no other information given…
Fuji
  • 28,214
  • 2
  • 27
  • 29
0
votes
0 answers

How do I make TensorFlow SimpleRNN static to Train on Colab TPU?

Reading the following from TPU FAQ: https://cloud.google.com/tpu/docs/faq Can I train a Recurrent Neural Network (RNN) on Compute Engine? In certain configurations, tf.static_rnn() and tf.dynamic_rnn() are compatible with the current TPU execution…
0
votes
1 answer

Dump HLO IR for TPU while using TPUClusterResolver

I'm using TPU through Google Colab and GCP, and want to dump XLA IR. But I have seen the xla doc in github xla index, and it only shows the way while the backend is CPU or GPU. I have tried using XLA_FLAGS="--xla_dump_hlo_as_text…
0
votes
1 answer

How to solve data fetch bottle neck for TPU inference?

This is what my inference setup looks like autotune = tf.data.experimental.AUTOTUNE with strategy.scope(): model = LoadModel() raw_dataset = tf.data.TFRecordDataset(tfRecordAddress) train_dataset = raw_dataset.map(_parse_example,…
SantoshGupta7
  • 5,607
  • 14
  • 58
  • 116
0
votes
0 answers

Saving TFrecords with TPU

I'm trying to use tf.data.experimental.TFRecordWriter to save dataset on Google cloud bucket using TPU. The code from the example in documentation works: dataset = tf.data.Dataset.range(3) dataset = dataset.map(tf.io.serialize_tensor) writer =…
0
votes
1 answer

TPU quota exceeded on project xxxx on Google Cloud Console

I am trying to initialize a TPU on Google Cloud Console on a particular project. On typing ctpu up I am prompted with the following usual message for me to confirm if I want to initialize the TPU or not. Zone: us-central1-b GCP…
0
votes
1 answer

Unsupported operation workaround

I have a custom layer which uses tf.py_function with some python code. Since this isn't supported by Cloud TPU, is it possible to place the computation for this layer on a CPU or GPU device? Or is the only solution to rewrite the function?
Jim
  • 3
  • 1
0
votes
1 answer

TPU throws error when trying to initiliase and setup, and then later during tf.keras model building

I ran this block of code using TF 2.2.0, Keras and some TPU config: try: TPU_WORKER = os.environ["TPU_NAME"] tpu = tf.distribute.cluster_resolver.TPUClusterResolver() print(f"Running on TPU: {tpu.cluster_spec().as_dict()['worker']}") …
Mani Sarkar
  • 115
  • 2
  • 9