sfvaroglu commented on code in PR #11606:
URL: https://github.com/apache/tvm/pull/11606#discussion_r891749259
##########
python/tvm/relay/frontend/onnx.py:
##########
@@ -2270,6 +2270,27 @@ def _impl_v12(cls, inputs, attr, params):
return cls._impl_v1(inputs, attr, params)
+ @classmethod
+ def _impl_v13(cls, inputs, attr, params):
+ data = inputs[0]
+ axes = inputs[1]
+
+ if not infer_shape(data): # promote scalar to 1-D tensor
+ data = _op.expand_dims(data, axis=0)
+
+ noop_with_empty_axes = attr.get("noop_with_empty_axes", 0)
+ num_axis = int(infer_type(axes).checked_type.shape[0]) if axes is not
None else 0
+
+ if noop_with_empty_axes and num_axis == 0:
+ return inputs[0]
+
+ if num_axis > 0:
Review Comment:
Oh, thanks!
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]