Skip to main content

Module memory

Module memory 

Source
Expand description

Logical storage-lifetime and physical device-memory analysis.

Structs§

LogicalDeviceMemoryStats
Logical-memory statistics for one device.
LogicalMemoryPeak
The simultaneous global logical-memory peak.
LogicalMemoryProfile
Evidence derived only from (device, storage_id) allocation lifetimes.
LogicalMemoryTimelinePoint
Simultaneous logical-memory state after all events at one timestamp.
LogicalStorageLifetime
One backend storage lifetime. Tensor aliases are metadata on the storage, not allocations.
MemoryProfile
Memory evidence for a trace. An absent plane is represented by None, never zeroes.
NodeMemoryMetrics
Per-node logical memory evidence. None means that metric was not observed.
PhysicalDeviceMemoryStats
Observed physical-memory extrema for one device.
PhysicalMemoryProfile
Physical memory evidence derived only from explicit device samples.
PhysicalMemoryTimelinePoint
One physical device or allocator checkpoint, retained without logical inference.

Enums§

MemoryAction
Allocation or deallocation recorded during a probe run.
MemoryCategory
Semantic category attached to a logical storage lifetime.

Functions§

analyze_memory
Analyze the logical and physical memory planes independently.
category_for_step
Map a training step and tensor flags to a semantic memory category.
dense_tensor_bytes
Dense tensor footprint (elem_count * dtype_bytes), not backing-allocation size.
dtype_size_bytes
Derive element size in bytes from a Candle-style dtype label (f32, F32, …).
elem_count
Product of shape dimensions; an empty shape is a scalar with one element.
node_memory_metrics
Attribute logical memory evidence to span ids and {span}/op/{n} operation ids.
resolve_dense_tensor_bytes
Resolve an explicit dense footprint or derive it from shape and dtype.