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 2020/09/10 20:26:24 UTC

[GitHub] [incubator-tvm] masahi opened a new pull request #6446: [ONNX] Add support for GatherElements conversion

masahi opened a new pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446


   https://github.com/onnx/onnx/blob/master/docs/Operators.md#GatherElements
   
   This is required to convert decision trees from hummingbird to Relay.
   
   please review @siju-samuel @jwfromm @mbrookhart  


----------------------------------------------------------------
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] [incubator-tvm] masahi commented on a change in pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
masahi commented on a change in pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#discussion_r486745778



##########
File path: tests/python/frontend/onnx/test_forward.py
##########
@@ -425,6 +425,45 @@ def test_gather():
     verify_gather((4, 3, 5, 6), [[2, 1, 0, 0]], 0, 'float32')
 
 
+def verify_gatherelements(in_shape, indices, axis):
+    x = np.random.uniform(size=in_shape).astype("float32")
+    indices = np.array(indices, dtype="int32")
+    print(x.shape)
+    print(indices.shape)
+

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:
users@infra.apache.org



[GitHub] [incubator-tvm] masahi merged pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
masahi merged pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446






----------------------------------------------------------------
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] [incubator-tvm] mbrookhart commented on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
mbrookhart commented on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-691374437


   I got the same error on another PR


----------------------------------------------------------------
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] [incubator-tvm] masahi commented on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-690924243






----------------------------------------------------------------
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] [incubator-tvm] masahi commented on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-691482345


   Thanks @siju-samuel @mbrookhart 


----------------------------------------------------------------
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] [incubator-tvm] tqchen edited a comment on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-691378874






----------------------------------------------------------------
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] [incubator-tvm] masahi commented on a change in pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
masahi commented on a change in pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#discussion_r487277214



##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       thanks for pointing this out, completely forgot




----------------------------------------------------------------
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] [incubator-tvm] tqchen commented on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-691378874






----------------------------------------------------------------
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] [incubator-tvm] masahi commented on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-690924243


   @siju-samuel please don't merge this PR until we first let https://github.com/apache/incubator-tvm/pull/6448 in (I was asked by Jared to merge that PR as soon as possible before any other PR, to avoid conflict)


----------------------------------------------------------------
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] [incubator-tvm] siju-samuel commented on a change in pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
siju-samuel commented on a change in pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#discussion_r486744994



##########
File path: tests/python/frontend/onnx/test_forward.py
##########
@@ -425,6 +425,45 @@ def test_gather():
     verify_gather((4, 3, 5, 6), [[2, 1, 0, 0]], 0, 'float32')
 
 
+def verify_gatherelements(in_shape, indices, axis):
+    x = np.random.uniform(size=in_shape).astype("float32")
+    indices = np.array(indices, dtype="int32")
+    print(x.shape)
+    print(indices.shape)
+

Review comment:
       Remove this prints

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       please follow the changes in pr #6448 here also, 
   check and change in test code as well.




----------------------------------------------------------------
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] [incubator-tvm] masahi merged pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
masahi merged pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446






----------------------------------------------------------------
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] [incubator-tvm] tqchen commented on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-691378874


   @masahi @mbrookhart thanks for pinging, please retrigger, the space issue has been resolved


----------------------------------------------------------------
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] [incubator-tvm] tqchen edited a comment on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-691378874


   @masahi @mbrookhart please retrigger, the space issue has been resolved


----------------------------------------------------------------
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] [incubator-tvm] tqchen commented on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-691378874


   @masahi @mbrookhart thanks for pinging, please retrigger, the space issue has been resolved


----------------------------------------------------------------
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] [incubator-tvm] tqchen edited a comment on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-691378874






----------------------------------------------------------------
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] [incubator-tvm] siju-samuel commented on a change in pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
siju-samuel commented on a change in pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#discussion_r487178658



##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       please follow the changes in pr #6448 here also, 
   check and change in test code as well.




----------------------------------------------------------------
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] [incubator-tvm] mbrookhart commented on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
mbrookhart commented on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-691374437






----------------------------------------------------------------
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] [incubator-tvm] masahi merged pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
masahi merged pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446


   


----------------------------------------------------------------
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] [incubator-tvm] masahi commented on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-690924243






----------------------------------------------------------------
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] [incubator-tvm] masahi commented on a change in pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
masahi commented on a change in pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#discussion_r486745778



##########
File path: tests/python/frontend/onnx/test_forward.py
##########
@@ -425,6 +425,45 @@ def test_gather():
     verify_gather((4, 3, 5, 6), [[2, 1, 0, 0]], 0, 'float32')
 
 
+def verify_gatherelements(in_shape, indices, axis):
+    x = np.random.uniform(size=in_shape).astype("float32")
+    indices = np.array(indices, dtype="int32")
+    print(x.shape)
+    print(indices.shape)
+

Review comment:
       oops thanks, fixed

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       thanks for pointing this out, completely forgot

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       thanks for pointing this out, completely forgot

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       thanks for pointing this out, completely forgot

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       thanks for pointing this out, completely forgot

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       thanks for pointing this out, completely forgot

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       thanks for pointing this out, completely forgot

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       thanks for pointing this out, completely forgot

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       thanks for pointing this out, completely forgot




----------------------------------------------------------------
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] [incubator-tvm] mbrookhart commented on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
mbrookhart commented on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-691374437


   I got the same error on another PR


----------------------------------------------------------------
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] [incubator-tvm] siju-samuel commented on a change in pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
siju-samuel commented on a change in pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#discussion_r486744994



##########
File path: tests/python/frontend/onnx/test_forward.py
##########
@@ -425,6 +425,45 @@ def test_gather():
     verify_gather((4, 3, 5, 6), [[2, 1, 0, 0]], 0, 'float32')
 
 
+def verify_gatherelements(in_shape, indices, axis):
+    x = np.random.uniform(size=in_shape).astype("float32")
+    indices = np.array(indices, dtype="int32")
+    print(x.shape)
+    print(indices.shape)
+

Review comment:
       Remove this prints

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       please follow the changes in pr #6448 here also, 
   check and change in test code as well.

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       please follow the changes in pr #6448 here also, 
   check and change in test code as well.

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       please follow the changes in pr #6448 here also, 
   check and change in test code as well.

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       please follow the changes in pr #6448 here also, 
   check and change in test code as well.

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       please follow the changes in pr #6448 here also, 
   check and change in test code as well.

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       please follow the changes in pr #6448 here also, 
   check and change in test code as well.

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       please follow the changes in pr #6448 here also, 
   check and change in test code as well.




----------------------------------------------------------------
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] [incubator-tvm] masahi commented on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-691341123


   @tqchen I've got "no space left on device" from CI. Is CI having a problem?
   https://ci.tvm.ai/blue/organizations/jenkins/tvm/detail/PR-6446/4/pipeline


----------------------------------------------------------------
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] [incubator-tvm] masahi commented on a change in pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
masahi commented on a change in pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#discussion_r486745778



##########
File path: tests/python/frontend/onnx/test_forward.py
##########
@@ -425,6 +425,45 @@ def test_gather():
     verify_gather((4, 3, 5, 6), [[2, 1, 0, 0]], 0, 'float32')
 
 
+def verify_gatherelements(in_shape, indices, axis):
+    x = np.random.uniform(size=in_shape).astype("float32")
+    indices = np.array(indices, dtype="int32")
+    print(x.shape)
+    print(indices.shape)
+

Review comment:
       oops thanks, fixed

##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       thanks for pointing this out, completely forgot




----------------------------------------------------------------
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] [incubator-tvm] siju-samuel commented on a change in pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
siju-samuel commented on a change in pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#discussion_r486744994



##########
File path: tests/python/frontend/onnx/test_forward.py
##########
@@ -425,6 +425,45 @@ def test_gather():
     verify_gather((4, 3, 5, 6), [[2, 1, 0, 0]], 0, 'float32')
 
 
+def verify_gatherelements(in_shape, indices, axis):
+    x = np.random.uniform(size=in_shape).astype("float32")
+    indices = np.array(indices, dtype="int32")
+    print(x.shape)
+    print(indices.shape)
+

Review comment:
       Remove this prints




----------------------------------------------------------------
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] [incubator-tvm] siju-samuel commented on a change in pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
siju-samuel commented on a change in pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#discussion_r487178658



##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1050,6 +1050,17 @@ def _impl_v1(cls, inputs, attr, params):
         return AttrCvt("take", extras={"axis": axis})(inputs, {})
 
 
+class GatherElements(OnnxOpConverter):
+    """ Operator converter for GatherElements.
+    """
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        data = inputs[0]
+        indices = inputs[1]
+        axis = attr.get('axis', 0)

Review comment:
       please follow the changes in pr #6448 here also, 
   check and change in test code as well.




----------------------------------------------------------------
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] [incubator-tvm] tqchen commented on pull request #6446: [ONNX] Add support for GatherElements conversion

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6446:
URL: https://github.com/apache/incubator-tvm/pull/6446#issuecomment-691378874


   @masahi @mbrookhart thanks for pinging, please retrigger, the space issue has been resolved


----------------------------------------------------------------
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