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] Introduce tests for Reshape, Squeeze and ExpandDims #14227

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mbencer
Copy link
Contributor

@mbencer mbencer commented Oct 16, 2024

This commit adds more tests for Reshape, Squeeze and ExpandDims. The purpose is to cover the cases where memory copying of those ops can be skipped.

ONE-DCO-1.0-Signed-off-by: Mateusz Bencer [email protected]

Draft: #14057

This commit adds more tests for Reshape, Squeeze and ExpandDims.
The purpose is to cover the cases where memory copying of those ops can be skipped.

ONE-DCO-1.0-Signed-off-by: Mateusz Bencer [email protected]
int reshape_out = cgen.addTensor({{2, 2}, circle::TensorType::TensorType_FLOAT32});
int cos2_out = cgen.addTensor({{2, 2}, circle::TensorType::TensorType_FLOAT32});

cgen.addOperatorCos({{input}, {cos1_out}});
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for curiosity,

Is there a specific reason to choose cos operator?
Did you choose cos because it is element-wise operator - which works without additional arguments?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This cos node is needed just to not set Reshape input/output as a input/output of the whole model (in such a case sharing memory is disabled). But I see your confusion so I've wrapped it in helper function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But I see your confusion so I've wrapped it in helper function.

Sorry, I've forgot to push the code last time ;)

@mbencer mbencer requested a review from zetwhite October 25, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants