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/11/25 21:26:25 UTC

[GitHub] [tvm] jwfromm commented on a change in pull request #6978: [Relay][Topi][Dynamic] Add a Sort op and use the legalization pass to perform dynamic topk on GPU

jwfromm commented on a change in pull request #6978:
URL: https://github.com/apache/tvm/pull/6978#discussion_r530650365



##########
File path: python/tvm/topi/sort.py
##########
@@ -161,3 +203,25 @@ def topk(data, k=1, axis=-1, ret_type="both", is_ascend=False, dtype="int64"):
         tag="topk_cpu",
     )
     return out
+
+
+@tvm.target.generic_func
+def dyn_topk_legalize(attrs, inputs, types):
+    """Legalizes dyn.topk op.

Review comment:
       Can you add a brief description of why legalization is needed here and what transformation is applied?




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