Skip to content

Commit

Permalink
add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Brookhart committed Nov 25, 2020
1 parent 91cae5f commit 5943a65
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/tvm/topi/cuda/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,12 @@ def schedule_topk(outs):
def _dyn_topk_legalize(attrs, inputs, arg_types):
"""Legalizes dyn.topk op.
On GPU, we don't directly implement a topi kernel. Instead, we combine
topi sort and topi strided slice to implement topk. This topi-level composition
doesn't work with the dynamic op. To support the dynamic op on gpu, we instead
legalize it into the same logic (sort + strided slice) in relay to take advantage
of the VM's dynamic shape capabilities
Parameters
----------
attrs : tvm.ir.Attrs
Expand Down

0 comments on commit 5943a65

Please sign in to comment.