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



##########
File path: python/tvm/topi/cuda/nms.py
##########
@@ -610,8 +610,10 @@ def _get_sorted_indices(data, data_buf, score_index, 
score_shape):
     )
 
     target = tvm.target.Target.current()
-    # TODO(masahi): Check -libs=thrust option
-    if target and target.kind.name in ["cuda", "rocm"] and 
is_thrust_available():
+    if target and (
+        can_use_thrust(target, "tvm.contrib.thrust.sort")
+        or can_use_rocthrust(target, "tvm.contrib.thrust.sort")
+    ):
         sort_tensor = argsort_thrust(score_tensor, axis=1, is_ascend=False, 
dtype="int32")
     else:
         sort_tensor = argsort(score_tensor, axis=1, is_ascend=False, 
dtype="int32")

Review comment:
       Warning added in 
https://github.com/apache/tvm/pull/7468/commits/f688f64739375931574f40c0618920cff5f3b492
   Please have a look




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