You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/04/09 17:17:34 UTC
[GitHub] [tvm] mbrookhart opened a new pull request #7818: [ONNX] Support optional outputs for ONNX nodes
mbrookhart opened a new pull request #7818:
URL: https://github.com/apache/tvm/pull/7818
Also enables some cast tests that were incorrectly skipped.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] mbrookhart commented on a change in pull request #7818: [ONNX] Support optional outputs for ONNX nodes
Posted by GitBox <gi...@apache.org>.
mbrookhart commented on a change in pull request #7818:
URL: https://github.com/apache/tvm/pull/7818#discussion_r610865204
##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -3202,6 +3202,24 @@ def from_onnx(self, graph, opset, get_output_expr=False):
outputs_num = 1
else:
outputs_num = len(op)
+ if outputs_num > 1:
+ valid_outputs = [False] * outputs_num
+ for i in range(len(node_output)):
+ if node_output[i] != "":
+ valid_outputs[i] = True
+ if not all(valid_outputs):
+ tup = op.astuple()
+ if isinstance(tup, _expr.Tuple):
Review comment:
No, we use TupleWrapper for other nodes, like call nodes with multiple outputs, see split: https://github.com/apache/tvm/blob/461d06eb5cfc7954f1983779acd05c47cea269f1/python/tvm/relay/op/transform.py#L861
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] jwfromm commented on pull request #7818: [ONNX] Support optional outputs for ONNX nodes
Posted by GitBox <gi...@apache.org>.
jwfromm commented on pull request #7818:
URL: https://github.com/apache/tvm/pull/7818#issuecomment-816851365
LGTM, i think a few comments explaining the logic here would be helpful though.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] yzhliu merged pull request #7818: [ONNX] Support optional outputs for ONNX nodes
Posted by GitBox <gi...@apache.org>.
yzhliu merged pull request #7818:
URL: https://github.com/apache/tvm/pull/7818
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] jwfromm commented on a change in pull request #7818: [ONNX] Support optional outputs for ONNX nodes
Posted by GitBox <gi...@apache.org>.
jwfromm commented on a change in pull request #7818:
URL: https://github.com/apache/tvm/pull/7818#discussion_r610806727
##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -3202,6 +3202,24 @@ def from_onnx(self, graph, opset, get_output_expr=False):
outputs_num = 1
else:
outputs_num = len(op)
+ if outputs_num > 1:
+ valid_outputs = [False] * outputs_num
+ for i in range(len(node_output)):
+ if node_output[i] != "":
+ valid_outputs[i] = True
+ if not all(valid_outputs):
+ tup = op.astuple()
+ if isinstance(tup, _expr.Tuple):
Review comment:
Does `op.astuple` not always return an `_expr.Tuple`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org