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 2022/06/07 18:23:46 UTC

[GitHub] [tvm] AndrewZhaoLuo commented on a diff in pull request #11606: [ONNX] Add ReduceSum opset13 support (non-dynamic)

AndrewZhaoLuo commented on code in PR #11606:
URL: https://github.com/apache/tvm/pull/11606#discussion_r891573251


##########
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)
+        if noop_with_empty_axes:

Review Comment:
   this should only be the case if axes is also empty/None reading the docs



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org