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

[luci/service] Support Range op Shape Inference for Non-const Param #14010

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

kyeong8139
Copy link
Contributor

@kyeong8139 kyeong8139 commented Sep 13, 2024

This commit Range op support shape inference for non-const param.

ONE-DCO-1.0-Signed-off-by: bokyeong lee [email protected]

@kyeong8139
Copy link
Contributor Author

kyeong8139 commented Sep 13, 2024

For: #13697
Related: #13790
Draft: #13981

@kyeong8139 kyeong8139 requested review from a team September 13, 2024 01:48
@kyeong8139 kyeong8139 added SSAFY PR/ready for review It is ready to review. Please review it. labels Sep 13, 2024
@kyeong8139 kyeong8139 changed the title [luci/service] Support Shape Inference for Non-const Param [luci/service] Support Range op Shape Inference for Non-const Param Sep 13, 2024
This commit support Range op shape inference for non-const param.

ONE-DCO-1.0-Signed-off-by: bokyeong lee <[email protected]>
shape.dim(r) = node->dim(r).known() ? node->dim(r).value() : 1;
}
return shape;
return output_shape;
Copy link
Contributor

Choose a reason for hiding this comment

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

above

output_shape.rank(1);

now output rank is 1. how is this valid?

Copy link
Contributor Author

@kyeong8139 kyeong8139 Sep 13, 2024

Choose a reason for hiding this comment

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

In the Range operation, the output is a sequence of numbers.
so output_shape.rank() is 1 both const and non-const params.
However, when params are non constant, dim(0).value() is determine in runtime.

+)
According to TensorFlow, Return is 'An 1-D Tensor of type dtype.' https://www.tensorflow.org/api_docs/python/tf/range#returns

Copy link
Contributor

@seanshpark seanshpark left a comment

Choose a reason for hiding this comment

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

LGTM thank you!

Copy link
Contributor

@zetwhite zetwhite left a comment

Choose a reason for hiding this comment

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

LGTM

@seanshpark seanshpark merged commit c8a53cf into Samsung:master Sep 13, 2024
10 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. SSAFY
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants