Skip to content

Clarify cond to If must contain a single element #5617

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

Merged
merged 10 commits into from
Sep 25, 2023

Conversation

justinchuby
Copy link
Member

@justinchuby justinchuby commented Sep 22, 2023

Description

Clarify cond to If must contain a single element. Previously it is unclear what the condition can be.

Fix reference runtime accordingly.

Motivation and Context

Fixes #5520

Signed-off-by: Justin Chu <justinchu@microsoft.com>
@justinchuby justinchuby requested a review from a team as a code owner September 22, 2023 22:42
@justinchuby justinchuby added auto update doc Generate md/proto files automatically using the CI pipeline topic: operator Issues related to ONNX operators labels Sep 22, 2023
@justinchuby justinchuby added this to the 1.15 milestone Sep 22, 2023
justinchuby and others added 2 commits September 22, 2023 15:42
Signed-off-by: Justin Chu <justinchu@microsoft.com>
justinchuby and others added 2 commits September 22, 2023 22:57
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
@justinchuby justinchuby requested a review from a team as a code owner September 23, 2023 02:11
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby justinchuby requested a review from xadupre September 23, 2023 02:19
@justinchuby justinchuby changed the title Clarity cond to If must contain a single element Clarify cond to If must contain a single element Sep 23, 2023
@justinchuby justinchuby added the topic: spec clarification Clarification of the ONNX spec needed label Sep 23, 2023
Copy link
Member

@jcwchen jcwchen left a comment

Choose a reason for hiding this comment

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

Is it worthy to add such a check (required single element for cond) in shape inference? Not sure whether it will break any existing usage tho.

Copy link
Contributor

@gramalingam gramalingam left a comment

Choose a reason for hiding this comment

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

Thanks for the update.

I created an issue #5622 to discuss the other aspect (whether the shape of the condition is required to be empty or if it can be anything, also in general for this and other similar ops).

But this seems fine for now.

@justinchuby justinchuby added this pull request to the merge queue Sep 25, 2023
@justinchuby
Copy link
Member Author

Is it worthy to add such a check (required single element for cond) in shape inference? Not sure whether it will break any existing usage tho.

Since the shape may be unknown I am not sure if the check is robust. I can do this as a follow up. Thanks!

Merged via the queue into onnx:main with commit c2418f7 Sep 25, 2023
@justinchuby justinchuby deleted the justinchu/clarify-if branch September 25, 2023 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto update doc Generate md/proto files automatically using the CI pipeline module: reference implementation topic: operator Issues related to ONNX operators topic: spec clarification Clarification of the ONNX spec needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non scalar as condition to If op
3 participants