Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Silas-Asamoah/stormlog/llms.txt
Use this file to discover all available pages before exploring further.
TFMemoryProfiler
Main TensorFlow GPU memory profiler class for capturing memory snapshots and profiling functions.Constructor
TensorFlow device name (e.g., ‘/GPU:0’, ‘/CPU:0’). Defaults to auto-detected device.
Whether to track individual tensor lifecycles
Methods
capture_snapshot
Capture current memory state at a point in time.Name identifier for the snapshot
Snapshot containing timestamp, GPU/CPU memory usage, tensor count, and utilization metrics
profile_function
Decorator to profile function memory usage.Function to profile
profile_context
Context manager for profiling code blocks.Name for the profiling context
start_continuous_profiling
Start continuous memory profiling in background thread.Sampling interval in seconds
stop_continuous_profiling
Stop continuous memory profiling.get_results
Get comprehensive profiling results.Peak memory usage in MB
Average memory usage in MB
Minimum memory usage in MB
Total profiling duration in seconds
Memory growth rate in MB/second
List of captured memory snapshots
Per-function profiling statistics
reset
Reset profiler state and clear all data.Usage as context manager
The profiler can be used as a context manager:MemorySnapshot
Represents a point-in-time memory snapshot.Unix timestamp of snapshot
Snapshot identifier
Current GPU memory usage in MB
Current CPU memory usage in MB
Reserved GPU memory in MB
GPU memory utilization percentage
Number of active tensors
ProfileResult
Comprehensive profiling results dataclass.Start timestamp
End timestamp
Peak memory usage
Average memory usage
Total memory allocations detected
Total memory deallocations detected