17#ifndef __ONERT_BACKEND_TRAIN_MEMORY_MANAGER_H__
18#define __ONERT_BACKEND_TRAIN_MEMORY_MANAGER_H__
44 std::shared_ptr<basic::Allocator> _var_mem_alloc;
45 uint32_t _optim_vars_count;
60 std::shared_ptr<basic::Allocator>
getMemAlloc() {
return _mem_alloc; }
67 std::shared_ptr<basic::IMemoryPlanner<DisposableTensorIndex>> _mem_planner;
68 std::shared_ptr<basic::Allocator> _mem_alloc;
87 std::shared_ptr<basic::IMemoryPlanner<LayerScopeTensorIndex>> _mem_planner;
88 std::shared_ptr<basic::Allocator> _mem_alloc;
DisposableMemoryManager()
void releasePlan(const DisposableTensorIndex &ind)
uint8_t * getBuffer(const DisposableTensorIndex &ind) const
void claimPlan(const DisposableTensorIndex &ind, uint32_t size)
std::shared_ptr< basic::Allocator > getMemAlloc()
Class that is index of DisposableTensor.
void claimPlan(const LayerScopeTensorIndex &ind, uint32_t size)
uint8_t * getBuffer(const LayerScopeTensorIndex &ind) const
LayerScopeMemoryManager()
void releasePlan(const LayerScopeTensorIndex &ind)
uint8_t * getOptVarBuffer(const ir::OperandIndex &ind, uint32_t pos_var) const
virtual ~TrainableMemoryManager()=default
Interface to plan memory.