ah-cheng commented on PR #10955:
URL: https://github.com/apache/tvm/pull/10955#issuecomment-1099938305

   Ahh, thanks for your time, @AndrewZhaoLuo when I set the freeze_params=True. 
I solved  this problem.
   And when I first follow the code , It dose use the dyn.topk. the k param 
saved in params as a var.  but I don`t know why i can`t get the k param. 
   
   BTW, when i commit this PR, I want to add a unit test case. but when i run 
"python test_forward.py". I get a error.
   firstly, I set "test_topk("llvm", tvm.cpu())" and run "python 
test_forward.py" ,but i get a error as follow:
   
![image](https://user-images.githubusercontent.com/50271153/163540523-5020ca7e-787a-4000-afb5-cff6510500e5.png)
   
   then I use "verify_topk([12, 12, 12], 5, 1)", continue run. then i found the 
args is a int.
   
![image](https://user-images.githubusercontent.com/50271153/163540811-db1961a2-a6f0-4fe9-a8cb-2a6fc2d1b4e4.png)
   Is this a question in test unit case please?
   
   or can we  fix the error as:
   args = [self.visit(node.slice)] if isinstance(self.visit(node.slice), int) 
else self.visit(node.slice)
   
   
    


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

Reply via email to