-
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] Register LayerScopeTensor to registry #14235
Conversation
fn_seq->iterate([&](exec::train::ITrainableFunction &fn) { | ||
register_tensors(op_idx, (&fn)->registerLayerScopeTensors()); | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll show log like this :
[ BackendContext ] register layerscope tensor for CategoricalCrossentropyLoss
[ BackendContext ] register layerscope tensor for Softmax
[ BackendContext ] register layerscope tensor for FullyConnected
[ BackendContext ] (idx: @8-0) registered
[ BackendContext ] (idx: @8-1) registered
[ BackendContext ] (idx: @8-2) registered
[ BackendContext ] register layerscope tensor for FullyConnected
[ BackendContext ] (idx: @7-0) registered
[ BackendContext ] (idx: @7-1) registered
[ BackendContext ] (idx: @7-2) registered
[ BackendContext ] (idx: @7-3) registered
[ BackendContext ] register layerscope tensor for Reshape
[ BackendContext ] register layerscope tensor for MaxPool2D
[ BackendContext ] (idx: @5-0) registered
[ BackendContext ] register layerscope tensor for Conv2D
[ BackendContext ] (idx: @4-0) registered
[ BackendContext ] (idx: @4-1) registered
[ BackendContext ] (idx: @4-2) registered
[ BackendContext ] (idx: @4-3) registered
[ BackendContext ] register layerscope tensor for Conv2D
[ BackendContext ] (idx: @3-0) registered
[ BackendContext ] (idx: @3-1) registered
[ BackendContext ] (idx: @3-2) registered
[ BackendContext ] (idx: @3-3) registered
0f7de66
to
b3d7ee6
Compare
<< std::endl; | ||
|
||
fn_seq->iterate([&](exec::train::ITrainableFunction &fn) { | ||
register_tensors(op_idx, (&fn)->registerLayerScopeTensors()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(&fn)->registerLayerScopeTensors()
call this functions and each layer will override this function.
ONE/runtime/onert/core/include/exec/train/ITrainableFunction.h
Lines 39 to 43 in 190b538
// Implement this if LayerScopeTensors is necessary | |
virtual std::optional<backend::train::LayerScopeTensors> registerLayerScopeTensors() | |
{ | |
return std::nullopt; | |
} |
This PR registers LayerScopeTensor from each layer into tensor registry. ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]> -------------------------------------- draft : Samsung#13486
b3d7ee6
to
06bbaee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@glistening Could you merge this PR? |
This PR registers LayerScopeTensor from each layer into tensor registry.
ONE-DCO-1.0-Signed-off-by: seunghui youn [email protected]
draft : #13486