heliqi commented on code in PR #13701:
URL: https://github.com/apache/tvm/pull/13701#discussion_r1062261690
##########
tests/python/frontend/paddlepaddle/test_forward.py:
##########
@@ -1681,5 +1687,15 @@ def forward(self, inputs, prev_h):
)
[email protected]_gpu
+def test_forward_topk():
+ @paddle.jit.to_static
+ def topk1(inputs):
+ return paddle.topk(inputs, k=1)
+
+ input_data = paddle.to_tensor([1, 4, 5, 7])
+ verify_model(topk1, input_data=input_data)
Review Comment:
You can add a few different cases, example:
1. k is a tensor and not just a int
2. set largest/axis/sort attribute
3. The output is only the values or the indices.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]