Module: tide.storage
Snapshot storage helpers for backward propagation.
Functions
Section titled “Functions”- storage_mode_to_int
Storage Modes
Section titled “Storage Modes”- device: snapshots stay on the compute device
- none: disable snapshot storage
- auto: use device storage subject to
bytes_limit_device
storage_mode_to_int
Section titled “storage_mode_to_int”Maps mode strings to backend integer constants used by native kernels.
Compression
Section titled “Compression”- bf16 storage is valid for float32 workflows and reduces snapshot capacity
See Also
Section titled “See Also”- Storage and Gradient Snapshots explains capacity planning and compression.
- Limitations lists backend-specific constraints.
Structured storage policy
Section titled “Structured storage policy”Application code should construct StorageOptions rather than call backend
integer helpers:
storage = tide.StorageOptions( mode=tide.StorageMode.AUTO, compression="bf16", bytes_limit_device=6 * 1024**3,)Internally, resolve_snapshot_storage converts this policy into an immutable
SnapshotStorageSpec containing normalized mode, representation, sample count,
and shot shape. SnapshotAllocator owns the concrete device buffers for one
forward/backward lifetime.
Capacity planning
Section titled “Capacity planning”auto compares the required snapshot capacity with bytes_limit_device.
Exceeding that limit raises MemoryError; it does not spill snapshots to host
memory or disk. Reserve headroom for live fields, model gradients, optimizer
state, receiver tensors, and runtime libraries.