-
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
[DRAFT][luci/service] Infer pad shape for non-const paddings. #13877
Conversation
ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]
related to : #13790 |
ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]
ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]
ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]
ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]
// Return shape of pad ops using const paddings. | ||
loco::TensorShape pad_shape(const loco::TensorShape &input_shape, const luci::CircleNode *paddings); |
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.
How about this?
At first glance, I feel hard to catch the meaning of const paddings
.
// Return shape of pad ops using const paddings. | |
loco::TensorShape pad_shape(const loco::TensorShape &input_shape, const luci::CircleNode *paddings); | |
// Return shape of pad ops using padding | |
// If paddings type is not a CircleConst, return the shape filled with unknown dimensions. | |
loco::TensorShape pad_shape(const loco::TensorShape &input_shape, const luci::CircleNode *paddings); |
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.
How about this? At first glance, I feel hard to catch the meaning of
const paddings
.
Nice point!
I miss the annotation was that of const
.
Now we can support non-const paddings
with this PR, it should be changed.
I'll fix it.
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 think there is some misuderstanding of const
.
const
of const luci::CircleNode *paddings
has nothing to do with CircleConst
.
Instead, implementation of this method(function) CANNOT modify paddings
.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
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 think I misunderstood his earlier point. 😂
There seems to be some confusion about the phrase // Return shape of pad ops using const paddings
:
- Interpreting
const
as referring toconst luci::CircleNode *paddings
- Interpreting it as meaning the padding node is constant
My original intention is the second interpretation, as we only support paddings
type with CricleConst
.
How about clarifying the sentence by revising it as follows?
// Return shape of pad ops using const paddings. | |
loco::TensorShape pad_shape(const loco::TensorShape &input_shape, const luci::CircleNode *paddings); | |
// Return shape of pad ops using paddings. | |
// If paddings is not static, return the shape filled with unknown dimensions. | |
loco::TensorShape pad_shape(const loco::TensorShape &input_shape, const luci::CircleNode *paddings); |
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.
looks good to me :)
ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]
This supports shape inference of pad when paddings is not constant.
ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]