Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 619570154
  • Loading branch information
mayankmalik-colab authored and colaboratory-team committed Mar 27, 2024
1 parent dd7d19d commit 1d5784e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions google/colab/_serverextension/_resource_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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,
)
]
Expand Down

0 comments on commit 1d5784e

Please sign in to comment.