-
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] Introduce tests for Reshape, Squeeze and ExpandDims #14227
base: master
Are you sure you want to change the base?
Conversation
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}}); |
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.
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?
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.
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.
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.
But I see your confusion so I've wrapped it in helper function.
Sorry, I've forgot to push the code last time ;)
@mbencer Please add negative test: same or more negative test with positive test to fulfill release criteria. |
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