[Relay/TOPI][Op] Add TopK operator (#3256)
authorHaichen Shen <shenhaichen@gmail.com>
Tue, 4 Jun 2019 23:29:56 +0000 (16:29 -0700)
committerLeyuan Wang <laurawly@gmail.com>
Tue, 4 Jun 2019 23:29:56 +0000 (16:29 -0700)
commit072f8cc75ec435f6c9557b480232018c9e22c25f
tree16df96821b2f00ade9f8953eecda4e8e85e2eb23
parent4204544b8b4b52305cd57d81e7755348f2acba51
[Relay/TOPI][Op] Add TopK operator (#3256)

* init impl for topk

* Fix cpu for topk

* init cuda impl for topk

* Add cuda for topk

* fix

* Add doc

* update doc

* lint

* lint

* lint

* x

* fix warning

* [Relay] Add TopK in tf converter

* Add frontend converter

* fix
24 files changed:
docs/api/python/topi.rst
docs/langref/relay_op.rst
include/tvm/relay/attrs/algorithm.h
python/tvm/relay/frontend/mxnet.py
python/tvm/relay/frontend/tensorflow.py
python/tvm/relay/op/_algorithm.py
python/tvm/relay/op/algorithm.py
python/tvm/relay/op/nn/nn.py
python/tvm/relay/op/transform.py
src/codegen/build_module.cc
src/contrib/sort/sort.cc
src/relay/op/algorithm/argsort.cc [moved from src/relay/op/algorithm/sort.cc with 94% similarity]
src/relay/op/algorithm/topk.cc [new file with mode: 0644]
tests/python/frontend/mxnet/test_forward.py
tests/python/frontend/tensorflow/test_forward.py
tests/python/relay/test_op_level6.py
topi/python/topi/cuda/__init__.py
topi/python/topi/cuda/nms.py
topi/python/topi/cuda/sort.py
topi/python/topi/generic/sort.py
topi/python/topi/sort.py
topi/python/topi/transform.py
topi/python/topi/vision/nms.py
topi/tests/python/test_topi_sort.py