Skip to content

Index

Memory Planners API

The memory_planners module provides classes that inherit from the AotMemoryPlanner class. These classes are responsible for the following tasks:

  1. Computing tensor lifetimes: This involves determining the lifetime of each tensor in the network graph, which is essential for memory management.
  2. Operator scheduling: This involves determining the order in which operators should be executed to optimize memory usage and performance.
  3. Memory allocation: This involves allocating memory for the tensors based on their lifetimes and the order of operator execution.

The AotMemoryPlanner class provides a common interface for all memory planners, and each subclass implements a specific memory planning algorithm. The MemoryPlannerMap dictionary maps the memory planner types to their respective classes, allowing for easy instantiation of the desired memory planner.

Available Memory Planners

  • GreedyMemoryPlanner: A greedy algorithm that allocates memory for tensors based on their lifetimes and the order of operator execution. This planner currently uses the default operator order from the LiteRT model.

Copyright 2025 Ambiq. All Rights Reserved.

Classes

Functions