簡體   English   中英

在 Google Colab Pro 中使用 TPU v3

[英]Use TPU v3 in Google Colab Pro

有沒有辦法在 Google Colab Pro 中使用 TPU v3 而不是 TPU v2?

不幸的是,我收到一條錯誤消息Compilation failure: Ran out of memory in memory space hbm. Used 8.29G of 7.48G hbm. Exceeded hbm capacity by 825.60M. Compilation failure: Ran out of memory in memory space hbm. Used 8.29G of 7.48G hbm. Exceeded hbm capacity by 825.60M. 使用 TPU v2,我不再使用 TPU v3。 因為 TPU v3 有更多內存。

有人知道可能性/選項嗎?

有了這個,我啟動了 TPU

try:
  tpu = tf.distribute.cluster_resolver.TPUClusterResolver()  # TPU detection
  print('Running on TPU ', tpu.cluster_spec().as_dict()['worker'])
except ValueError:
  raise BaseException('ERROR: Not connected to a TPU runtime; please see the previous cell in this notebook for instructions!')


tf.config.experimental_connect_to_cluster(tpu)
tf.tpu.experimental.initialize_tpu_system(tpu)
#tpu_strategy = tf.distribute.experimental.TPUStrategy(tpu)
strategy = tf.distribute.TPUStrategy(tpu)

簡短的回答是否定的。 沒有辦法指定您想要的特定 TPU 版本。 不過,我相信 Kaggle 提供了 v3-8 TPU(由於它是免費的,因此也可能會發生變化)。 此外,正如另一個答案所指出的,您也可以自己啟動付費 Cloud TPU,您可以為其指定特定的硬件。

據我所知,免費版 Colab 沒有提供任何方式來選擇 GPU 和 TPU。 不過,還有專業版。

如果確實需要,您可以以 8.00 美元/小時的價格從 CloudTPU 購買特定的 TPU v3。

引用 Colab 常見問題解答:

無法在任何給定時間選擇可以在 Colab 中連接到哪種類型的 GPU。 有興趣更可靠地訪問 Colab 最快 GPU 的用戶可能會對 Colab Pro 感興趣。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM