-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[onert/train] Attach auxiliary tensors to tensor builder #13282
Comments
This comment was marked as outdated.
This comment was marked as outdated.
After some work on #13486, mnist
[ ALLOC ] allocation capacity: 11360128 # non-const
[ ALLOC ] allocation capacity: 1938880 # trainable
[ ALLOC ] allocation capacity: 11360000 # back-prop
[ ALLOC ] allocation capacity: 1938880 # gradient
[ ALLOC ] allocation capacity: 3877760 # opt variable
[ ALLOC ] allocation capacity: 3211264 # disposable
[ ALLOC ] allocation capacity: 6627328 # extra tensors mobile net v2
[ ALLOC ] allocation capacity: 361362288 # non-const
[ ALLOC ] allocation capacity: 13951408 # trainable
[ ALLOC ] allocation capacity: 361362240 # back-prop
[ ALLOC ] allocation capacity: 13951408 # gradient
[ ALLOC ] allocation capacity: 27902816 # opt variable
[ ALLOC ] allocation capacity: 49032960 # disposable
[ ALLOC ] allocation capacity: 96350208 # extra tensors /cc @ragmani |
After applying all PRs related to the draft #13305, the other allocation capacity will be reduces as follows: mnist33686912(32.1 MB) -> 25187648(24.0MB)
mobile net v2
The capacity of optimizer variable is |
I'll start to make PR based on the draft. ( #13486 ) TODO
|
This PR adds registerLayerScopeTensors to ITrainableFunction. 'registerLayerScopeTensors` is to register LayerScopeTensor into TensorReigstry. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> draft : Samsung#13486 for : Samsung#13282
This PR adds registerLayerScopeTensors to ITrainableFunction. 'registerLayerScopeTensors` is to register LayerScopeTensor into TensorReigstry. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> draft : Samsung#13486 for : Samsung#13282
This PR templatize memory planner factory in train backend. MemoryPlannerFactory currently used for DisposableTensorIndex, but it will be also used for LayerScopeTensorIndex. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> draft : Samsung#13486 for : Samsung#13282
This PR introduces LayerScopeMemoryManager. This Manager will be added to TensorManager and used to allocate LayerScopeTensors. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> draft : Samsung#13486 for : Samsung#13282
This PR introduces LayerScopeMemoryManager. This Manager will be added to TensorManager and used to allocate LayerScopeTensors. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> draft : Samsung#13486 for : Samsung#13282
This PR introduces LayerScopeMemoryManager. This Manager will be added to TensorManager and used to allocate LayerScopeTensors. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> draft : Samsung#13486 for : Samsung#13282
This PR adds LayerScopeTensors into TensorRegistry. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> draft : Samsung#13486 for : Samsung#13282
This PR introduces LayerScopeMemoryManager. This Manager will be added to TensorManager and used to allocate LayerScopeTensors. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> draft : #13486 for : #13282
This PR adds LayerScopeManager into TensorManager. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> draft : Samsung#13486 for : Samsung#13282
This PR adds LayerScopeTensors into TensorRegistry. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> draft : Samsung#13486 for : Samsung#13282
This PR adds LayerScopeTensors into TensorRegistry. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> draft : Samsung#13486 for : Samsung#13282
This PR adds LayerScopeManager into TensorManager. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> draft : Samsung#13486 for : Samsung#13282
Background
backendtrain/ops/*Layer
has extra(auxiliary) tensors used forbackward()
.For example,
ONE/runtime/onert/backend/train/ops/FullyConnectedLayer.h
Lines 61 to 65 in 60683ad
ONE/runtime/onert/backend/train/ops/ConvolutionLayer.h
Lines 56 to 60 in 60683ad
These tensors are allocated when
KernelGenerator
visits each operation.ONE/runtime/onert/backend/train/ops/FullyConnectedLayer.cc
Lines 88 to 96 in 60683ad
What
These auxiliary tensors always hold memory after being configured.
So, Adding these tensors into TensorBuilder to use a memory planner might be helpful.
The text was updated successfully, but these errors were encountered: