tensorflow - 在 google colab 中,有没有办法检查正在运行的 GPU 版本?

标签 tensorflow google-colaboratory tpu

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/

相关文章:

python - 根据条件从单元格内停止执行 Colab notebook

python - 如何在 Tensorflow 中高效加入 TFRecords 中的数据

tensorflow - Colab+TPU 不支持 TF 2.3.0 tf.keras.layers.experimental.preprocessing

machine-learning - 训练神经网络时对批量数据进行混洗

python - 如何获取全连接层神经元的数量?

python - Tensorflow 图形编辑器重新路由复杂网络

python-3.x - 如何通过 Python 使用 SHEET API v4 删除 google 电子表格中的行?

python - matplotlib set_major_locator 不起作用

python - Keras 新手 : how to load a pretrained MalConv model to predict in my data?