You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's introduce use-def chains and new index types for training into TrainableGraph and apply it for memory optimization.
Why
There was no use-def chains that could directly know dependencies between operations and operands in a TrainableGraph. So we were not even verifying whether TrainableGraph is a dag graph, and we were also unable to optimize memory for training.
Ways to support new index types for training
New types : TrainingOperationIndex, TrainingOperandIndex
A way of distinguishing whether an operand or an operation is in forwarding and backwarding by using an existing index number and the information on whether it is in forwarding or in backwarding within the new index types.
An example
template <typename Index> classTrainingIndexclassTrainingIndex
{
...
private:
Index _index;
bool _is_forward;
}
using TrainingOperationIndex = TrainingIndex<OperationIndex>;
using TrainingOperandIndex = TrainingIndex<OperandIndex>;
A way of distinguishing whether an operand or an operation is in forwarding and backwarding only by using an new index number within the new index types.
An example
using TrainingOperationIndex = ::onert::util::Index<uint32_t, TrainingOperationIndexTag>;
using TrainingOperandIndex = ::onert::util::Index<uint32_t, TrainingOperandIndexTag>;
What
Let's introduce use-def chains and new index types for training into
TrainableGraph
and apply it for memory optimization.Why
There was no use-def chains that could directly know dependencies between operations and operands in a
TrainableGraph
. So we were not even verifying whetherTrainableGraph
is a dag graph, and we were also unable to optimize memory for training.Ways to support new index types for training
New types :
TrainingOperationIndex
,TrainingOperandIndex
I'm trying with the first way.
Draft : #13305
The text was updated successfully, but these errors were encountered: