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

[ONNX] Support optional outputs for ONNX nodes #7818

Merged
merged 2 commits into from
Apr 12, 2021

Conversation

mbrookhart
Copy link
Contributor

Also enables some cast tests that were incorrectly skipped.

@mbrookhart mbrookhart requested a review from jwfromm April 9, 2021 17:17
valid_outputs[i] = True
if not all(valid_outputs):
tup = op.astuple()
if isinstance(tup, _expr.Tuple):
Copy link
Contributor

Choose a reason for hiding this comment

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

Does op.astuple not always return an _expr.Tuple?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, we use TupleWrapper for other nodes, like call nodes with multiple outputs, see split:

return TupleWrapper(_make.split(data, indices_or_sections, axis), ret_size)

@jwfromm
Copy link
Contributor

jwfromm commented Apr 9, 2021

LGTM, i think a few comments explaining the logic here would be helpful though.

Copy link
Member

@yzhliu yzhliu left a comment

Choose a reason for hiding this comment

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

@yzhliu yzhliu merged commit f38ae65 into apache:main Apr 12, 2021
@mbrookhart mbrookhart deleted the onnx_optional_outputs branch April 12, 2021 17:34
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
* Support optional outputs for ONNX nodes

* add comments
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
* Support optional outputs for ONNX nodes

* add comments
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
* Support optional outputs for ONNX nodes

* add comments
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request May 11, 2021
* Support optional outputs for ONNX nodes

* add comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants