在Google Colab中,有没有一种方法可以检查正在运行的TPU版本?

编程入门 行业动态 更新时间:2024-10-25 20:24:56
本文介绍了在Google Colab中,有没有一种方法可以检查正在运行的TPU版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

colab提供免费的TPU.可以很容易地看到有多少个内核,但是我想知道是否有可能看到每个内核有多少内存?

colab offers free TPUs. It's easy to see how many cores are given, but I was wondering if its possible to see how much memory per core?

推荐答案

据我所知,我们没有Tensorflow op或类似的访问内存信息的方法,尽管在XRT中我们有.同时,下面的代码片段会起作用吗?

As far as I know we don't have an Tensorflow op or similar for accessing memory info, though in XRT we do. In the meantime, would something like the following snippet work?

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( cloud.google/tpu ).

TPUv2 has 8GB per-core and TPUv3 has 16GB HBM per-core (cloud.google/tpu).

更多推荐

在Google Colab中,有没有一种方法可以检查正在运行的TPU版本?

本文发布于:2023-11-23 19:35:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622634.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:正在运行   版本   方法   Google   Colab

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!