masahi edited a comment on pull request #7441:
URL: https://github.com/apache/tvm/pull/7441#issuecomment-777861757


   @ymwangg For a general op like `unique`, we should follow numpy API, rather 
than being too specific to TF. PyTorch unique should be supported by the same 
API. Framework specific details should go into the frontend.
   
   Numpy and PyTorch supports `dim` argument to do unique on multidimensional 
input, but I don't think it's a good idea. So restricting to 1D, at least for 
the first implementation, sounds good to me.
   
   We can implement `unique` via sorting and cumsum (without hash table). If 
implemented this way, the same code works on both CPU and GPU. That's I'm 
planning to do, but if you feel brave, you can try that in this PR 
:slightly_smiling_face:  But it is likely not going to be faster than the hash 
table based implementation, since it requires multiple passes over input. This 
could be useful if the hash based impl cannot be used for some reason.


----------------------------------------------------------------
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:
[email protected]


Reply via email to