Skip to content
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

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

zetwhite
Copy link
Contributor

This PR registers LayerScopeTensor from each layer into tensor registry.

ONE-DCO-1.0-Signed-off-by: seunghui youn [email protected]


draft : #13486

fn_seq->iterate([&](exec::train::ITrainableFunction &fn) {
register_tensors(op_idx, (&fn)->registerLayerScopeTensors());
});
}
Copy link
Contributor Author

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

@zetwhite zetwhite added the PR/ready for review It is ready to review. Please review it. label Oct 18, 2024
@zetwhite zetwhite requested review from ragmani and a team October 18, 2024 03:54
@zetwhite zetwhite marked this pull request as draft October 18, 2024 04:00
@zetwhite zetwhite removed the PR/ready for review It is ready to review. Please review it. label Oct 18, 2024
@zetwhite zetwhite force-pushed the 1018/tregister branch 2 times, most recently from 0f7de66 to b3d7ee6 Compare October 18, 2024 04:13
<< std::endl;

fn_seq->iterate([&](exec::train::ITrainableFunction &fn) {
register_tensors(op_idx, (&fn)->registerLayerScopeTensors());
Copy link
Contributor Author

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.

// 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
@zetwhite zetwhite marked this pull request as ready for review October 18, 2024 06:05
@zetwhite zetwhite added the PR/ready for review It is ready to review. Please review it. label Oct 18, 2024
Copy link
Contributor

@ragmani ragmani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zetwhite
Copy link
Contributor Author

@glistening Could you merge this PR?

@chunseoklee chunseoklee merged commit b480c56 into Samsung:master Oct 21, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR/ready for review It is ready to review. Please review it.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants