masahi commented on a change in pull request #7441:
URL: https://github.com/apache/tvm/pull/7441#discussion_r579910453



##########
File path: python/tvm/relay/frontend/pytorch.py
##########
@@ -2164,6 +2164,21 @@ def is_floating_point(self, inputs, input_types):
         is_float = input_type in ["float32", "float64", "float16", "bfloat16"]
         return _expr.const(is_float)
 
+    def unique(self, inputs, input_types):
+        assert len(inputs) == 4
+        [data, is_sorted, return_inverse, return_counts] = inputs
+        if return_counts:

Review comment:
       yeah, PyTorch doc 
https://pytorch.org/docs/stable/generated/torch.unique.html says their CUDA 
unique always returns sorted outputs regardless of `sorted` arg. So I think we 
can also assume that `is_sorted` is always True and add a warning if 
`is_sorted` arg is False.




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