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/backend] Add LayerScopeTensor interface to TensorBuilder #14198

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

zetwhite
Copy link
Contributor

@zetwhite zetwhite commented Oct 10, 2024

This PR adds LayerScopeTensor related interface to TensorBuilder.

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


draft : #13486

This PR adds LayerScopeTensor related interface to TensorBuilder.

ONE-DCO-1.0-Signed-off-by: seunghui youn <[email protected]>
@@ -77,6 +90,7 @@ class TensorBuilder
ir::OperandIndexMap<ir::OperandInfo> _backward_tensor_info_map;
ir::OperandIndexMap<bool> _as_constants;
util::Set<DisposableTensorIndex> _disposable_backprops;
ir::OperationIndexMap<util::Set<LayerScopeTensorIndex>> _operation_to_layerscope;
Copy link
Contributor Author

@zetwhite zetwhite Oct 10, 2024

Choose a reason for hiding this comment

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

Each operation can have several LayerScopeTensors.
So, This _operation_to_layerscope saves the operation_index - layerscope_tensor_index relation - which will be used for planning.

Comment on lines 76 to 80
bool isRegisteredLayerScopeTensor(const ir::OperationIndex &) const;

const util::Set<LayerScopeTensorIndex> &
getRegisteredLayerScopeTensorIndex(const ir::OperationIndex &) const;
LayerScopeTensorLifeTime getLayerScopeTensorLifeTime(const LayerScopeTensorIndex &) const;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These will be used in TensorPlanner : https://github.com/Samsung/ONE/pull/13486/files#r1795202407

@zetwhite zetwhite requested review from ragmani and a team October 10, 2024 11:01
@zetwhite zetwhite added the PR/ready for review It is ready to review. Please review it. label Oct 10, 2024
ragmani
ragmani previously approved these changes Oct 11, 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

runtime/onert/backend/train/TensorBuilder.cc Show resolved Hide resolved
runtime/onert/backend/train/TensorBuilder.h Outdated Show resolved Hide resolved
Copy link
Contributor

@glistening glistening left a comment

Choose a reason for hiding this comment

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

LGTM

@glistening glistening merged commit b70d6eb into Samsung:master Oct 14, 2024
9 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