繁体   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