ONE - On-device Neural Engine
|
Interface to plan memory. More...
#include <IMemoryPlanner.h>
Public Types | |
using | MemoryPlans = std::unordered_map< Index, Block > |
Public Member Functions | |
virtual void | claim (const Index &, size_t)=0 |
Claim memory for tensor. | |
virtual void | release (const Index &)=0 |
Release memory for tensor. | |
virtual uint32_t | capacity ()=0 |
Get capacity for memory planning. | |
virtual MemoryPlans & | memory_plans ()=0 |
Get MemoryPlans. | |
virtual | ~IMemoryPlanner ()=default |
Interface to plan memory.
Definition at line 43 of file IMemoryPlanner.h.
using onert::backend::basic::IMemoryPlanner< Index >::MemoryPlans = std::unordered_map<Index, Block> |
Definition at line 45 of file IMemoryPlanner.h.
|
virtualdefault |
|
pure virtual |
Get capacity for memory planning.
Implemented in onert::backend::train::BumpPlanner< Index >, onert::backend::train::FirstFitPlanner< Index >, onert::backend::train::WICPlanner< Index >, onert::backend::basic::BumpPlanner, onert::backend::basic::FirstFitPlanner, and onert::backend::basic::WICPlanner.
|
pure virtual |
Claim memory for tensor.
[in] | index | The tensor index |
[in] | size | The size of the memory |
Implemented in onert::backend::train::BumpPlanner< Index >, onert::backend::train::FirstFitPlanner< Index >, onert::backend::train::WICPlanner< Index >, onert::backend::basic::BumpPlanner, onert::backend::basic::FirstFitPlanner, and onert::backend::basic::WICPlanner.
Referenced by onert::backend::basic::MemoryManager::claimPlan().
|
pure virtual |
Get MemoryPlans.
Implemented in onert::backend::train::BumpPlanner< Index >, onert::backend::train::FirstFitPlanner< Index >, onert::backend::train::WICPlanner< Index >, onert::backend::basic::BumpPlanner, onert::backend::basic::FirstFitPlanner, and onert::backend::basic::WICPlanner.
|
pure virtual |
Release memory for tensor.
[in] | index | The tensor index |
Implemented in onert::backend::train::BumpPlanner< Index >, onert::backend::train::FirstFitPlanner< Index >, onert::backend::train::WICPlanner< Index >, onert::backend::basic::BumpPlanner, onert::backend::basic::FirstFitPlanner, and onert::backend::basic::WICPlanner.