colab 提供免费的 TPU。很容易看到给定了多少个内核,但我想知道是否可以查看每个内核有多少内存?
最佳答案
据我所知,我们没有用于访问内存信息的 Tensorflow 操作或类似操作,但在 XRT 中我们有。与此同时,像下面的代码片段会起作用吗?
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))
输出看起来像: Timestamp: 22:23:03
TPU type: TPU v2
Utilization of TPU Matrix Units (higher is better): 0.000%
TPUv2 每核 8GB,TPUv3 每核 16GB HBM ( https://cloud.google.com/tpu )。
关于tensorflow - 在 google colab 中,有没有办法检查正在运行的 GPU 版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63009227/