masahi commented on a change in pull request #6372:
URL: https://github.com/apache/incubator-tvm/pull/6372#discussion_r481023537
##########
File path: python/tvm/relay/frontend/pytorch.py
##########
@@ -132,6 +132,32 @@ def _impl(inputs, input_types):
return _impl
+def _min_max_common(name_elemwise, name_reduce):
+ def _impl(inputs, input_types):
+ if len(inputs) == 1:
+ data = _pytorch_promote_types(inputs[:1], input_types[:1])
+ return get_relay_op(name_reduce)(data[0])
+ elif len(inputs) >= 2 and isinstance(inputs[1], int):
+ data = _pytorch_promote_types(inputs[:1], input_types[:1])
+ dim = inputs[1]
+ keepdims = inputs[2] if len(inputs) > 2 else False
+ print(dim, keepdims)
Review comment:
oops, thanks. fixed
----------------------------------------------------------------
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:
[email protected]