MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / gpu_mem_usage

Function gpu_mem_usage

yolox/utils/metric.py:43–48  ·  view source on GitHub ↗

Compute the GPU memory usage for the current device (MB).

()

Source from the content-addressed store, hash-verified

41
42
43def gpu_mem_usage():
44 """
45 Compute the GPU memory usage for the current device (MB).
46 """
47 mem_usage_bytes = torch.cuda.max_memory_allocated()
48 return mem_usage_bytes / (1024 * 1024)
49
50
51class AverageMeter:

Callers 1

after_iterMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected