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/03/03 21:24:37 UTC

[GitHub] [tvm] codeislife99 commented on a change in pull request #7562: Add segment sum Op to relay and 7 corresponding TF Ops , fix scatter_add dynamic bug

codeislife99 commented on a change in pull request #7562:
URL: https://github.com/apache/tvm/pull/7562#discussion_r586796521



##########
File path: python/tvm/relay/op/transform.py
##########
@@ -1450,6 +1450,75 @@ def sparse_reshape(sparse_indices, prev_shape, new_shape):
     return TupleWrapper(_make.sparse_reshape(sparse_indices, prev_shape, new_shape), 2)
 
 
+def segment_sum(data, segment_ids, num_segments=None):
+    """
+    Computes the sum along segment_ids along axis 0. If multiple segment_ids reference the same
+    location their contributions add up.
+    result[index] = Σi... data[i...] where index = segment_ids[i]

Review comment:
       Yes, corrected it now. 




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