Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 51d647f

Browse files
ortigaliortibazar
andauthored
Adds accelerator_model as tpuvm if os.environ has TPUVM_MODE (#526)
* Adds check to determine tpu mode by checking env_vars of TPUVM_MODE * Fixes os env key error Co-authored-by: Orti Bazar <orti@google.com>
1 parent 471c548 commit 51d647f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

perfzero/lib/perfzero/report_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import importlib
1919
import json
2020
import logging
21+
import os
2122
import perfzero.utils as utils
2223
import psutil
2324
import socket
@@ -211,7 +212,9 @@ def build_execution_summary(execution_timestamp, execution_id,
211212
system_info['platform_name'] = platform_name
212213
if system_name:
213214
system_info['system_name'] = system_name
214-
if not is_tpu_benchmark:
215+
if os.getenv('TPUVM_MODE'):
216+
system_info['accelerator_model'] = 'tpuvm'
217+
elif not is_tpu_benchmark:
215218
gpu_info = utils.get_gpu_info()
216219
if gpu_info:
217220
system_info['accelerator_driver_version'] = gpu_info['gpu_driver_version']

0 commit comments

Comments
 (0)