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

[DRAFT][luci/service] Infer pad shape for non-const paddings. #13877

Closed
wants to merge 7 commits into from

Conversation

icodo98
Copy link
Contributor

@icodo98 icodo98 commented Sep 2, 2024

This supports shape inference of pad when paddings is not constant.

ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]

@icodo98
Copy link
Contributor Author

icodo98 commented Sep 2, 2024

related to : #13790

@icodo98 icodo98 changed the title [luci] Infer pad shape for non-const paddings. [luci/service] Infer pad shape for non-const paddings. Sep 2, 2024
@icodo98 icodo98 added DRAFT A draft issue or PR for sharing one's current working status and discussion. SSAFY labels Sep 2, 2024
@icodo98 icodo98 requested a review from zetwhite September 2, 2024 08:10
ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]
ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]
@icodo98 icodo98 changed the title [luci/service] Infer pad shape for non-const paddings. [DRAFT][luci/service] Infer pad shape for non-const paddings. Sep 4, 2024
Comment on lines 51 to 52
// Return shape of pad ops using const paddings.
loco::TensorShape pad_shape(const loco::TensorShape &input_shape, const luci::CircleNode *paddings);
Copy link
Contributor

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.

Suggested change
// 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);

Copy link
Contributor Author

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.

Copy link
Contributor

@seanshpark seanshpark Sep 4, 2024

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.

Copy link
Contributor Author

@icodo98 icodo98 Sep 5, 2024

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:

  1. Interpreting const as referring to const luci::CircleNode *paddings
  2. 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?

Suggested change
// 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);

Copy link
Contributor

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]
@icodo98 icodo98 marked this pull request as ready for review September 8, 2024 08:00
@icodo98 icodo98 changed the title [DRAFT][luci/service] Infer pad shape for non-const paddings. [luci/service] Infer pad shape for non-const paddings. Sep 8, 2024
@icodo98 icodo98 added PR/ready for review It is ready to review. Please review it. and removed DRAFT A draft issue or PR for sharing one's current working status and discussion. labels Sep 8, 2024
@icodo98 icodo98 requested review from a team September 8, 2024 08:01
@icodo98 icodo98 changed the title [luci/service] Infer pad shape for non-const paddings. [DRAFT][luci/service] Infer pad shape for non-const paddings. Sep 8, 2024
@icodo98 icodo98 removed the request for review from a team September 8, 2024 08:38
@icodo98 icodo98 added DRAFT A draft issue or PR for sharing one's current working status and discussion. and removed PR/ready for review It is ready to review. Please review it. labels Sep 8, 2024
@icodo98 icodo98 closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DRAFT A draft issue or PR for sharing one's current working status and discussion. SSAFY
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants