From 1d5784ea35392fba8d48f6b26b3451c3f0cc2c8c Mon Sep 17 00:00:00 2001 From: Mayank Malik Date: Wed, 27 Mar 2024 10:12:18 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 619570154 --- google/colab/_serverextension/_resource_monitor.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/google/colab/_serverextension/_resource_monitor.py b/google/colab/_serverextension/_resource_monitor.py index 4f81ce29..51803d94 100644 --- a/google/colab/_serverextension/_resource_monitor.py +++ b/google/colab/_serverextension/_resource_monitor.py @@ -18,6 +18,8 @@ # Track whether user has used the GPU in the current session. _GPU_EVER_USED = False +_T4_TOTAL_MEMORY_BYTES = 16106127360 + @functools.cache def _nvidia_smi_path(): @@ -48,10 +50,10 @@ def get_gpu_stats(): return [ GpuInfo( name='Tesla T4', - memoryUsedBytes=123, - memoryTotalBytes=456, + memoryUsedBytes=0.35 * _T4_TOTAL_MEMORY_BYTES, + memoryTotalBytes=_T4_TOTAL_MEMORY_BYTES, gpuUtilization=0.1, - memoryUtilization=0.2, + memoryUtilization=0.35, everUsed=True, ) ]