Skip to main content

Module memory

Module memory 

Source
Expand description

Memory timeline analysis — TensorFlow Memory Profile model.

Structs§

DeviceMemoryStats
Per-device memory stats.
LiveAllocation
Active allocation at the global peak (TensorFlow breakdown table).
MemoryProfile
Full memory profile reconstructed from trace evidence.
MemorySummary
Aggregated memory statistics for one probe run.
MemoryTimelinePoint
One point on the memory-vs-time curve for a device.
NodeMemoryMetrics
Per-span / per-op TensorFlow memory metrics.

Enums§

MemoryAction
Allocation or deallocation recorded during a probe run.
MemoryCategory
TensorFlow-profiler-style memory category for timeline breakdown.

Functions§

analyze_memory
Build a TensorFlow-style memory profile from a parsed trace document.
category_for_step
Map a training step (+ tensor flags) to a PyTorch-style memory category.
dtype_size_bytes
Derive element size in bytes from a Candle-style dtype label (f32, F32, …).
elem_count
Product of shape dimensions; returns 0 for empty shape.
node_memory_metrics
Attribute memory metrics to graph node ids (span ids and {span}/op/{n} op ids).
resolve_storage_bytes
Resolve explicit bytes or derive from shape/dtype.
storage_bytes
Storage bytes for a dense tensor (elem_count × dtype_bytes).