tlm_adjoint.checkpoint_schedules.mixed
Module Contents
- class tlm_adjoint.checkpoint_schedules.mixed.MixedCheckpointSchedule(max_n, snapshots, *, storage='disk')
A checkpointing schedule which mixes storage of forward restart data and non-linear dependency data in checkpointing units. Assumes that the data required to restart the forward has the same size as the data required to advance the adjoint over a step.
Described in
James R. Maddison, ‘Step-based checkpointing with high-level algorithmic differentiation’, Journal of Computational Science 82, 102405, 2024, doi: 10.1016/j.jocs.2024.102405
Offline, one adjoint calculation permitted.
- Parameters:
max_n – The number of forward steps in the initial forward calculation.
snapshots – The number of available checkpointing units.
storage – Checkpointing unit storage location. Either ‘RAM’ or ‘disk’.
- property is_exhausted
Whether the schedule has concluded. Note that some schedules permit multiple adjoint calculation, and may never conclude.
- property uses_disk_storage
Whether the schedule may use disk storage. If False then no disk storage is required.
- iter()
A generator which should be overridden in derived classes in order to define a checkpointing schedule.