Laurawly commented on a change in pull request #6839:
URL: https://github.com/apache/tvm/pull/6839#discussion_r540655119



##########
File path: python/tvm/topi/cuda/nms.py
##########
@@ -554,12 +757,7 @@ def non_max_suppression(
     score_axis = score_index
     score_shape = (batch_size, num_anchors)
     score_tensor = te.compute(score_shape, lambda i, j: data[i, j, 
score_axis], tag=tag.ELEMWISE)
-    target = tvm.target.Target.current()
-    if (
-        target
-        and target.kind.name == "cuda"
-        and tvm.get_global_func("tvm.contrib.thrust.sort_nms", 
allow_missing=True)
-    ):
+    if tvm.get_global_func("tvm.contrib.thrust.sort_nms", allow_missing=True):

Review comment:
       Opencl doesn't have thrust lib, assert target is cuda here.

##########
File path: python/tvm/topi/cuda/sort.py
##########
@@ -103,9 +103,9 @@ def sort_ir(data, values_out, axis, is_ascend, 
indices_out=None):
     nthread_bx = shape[axis] // max_threads + 1
 
     tx = te.thread_axis("threadIdx.x")
-    bx = te.thread_axis("vthread")
+    bx = te.thread_axis("blockIdx.x")
     ib.scope_attr(tx, "thread_extent", nthread_tx)
-    ib.scope_attr(bx, "virtual_thread", nthread_bx)
+    ib.scope_attr(bx, "thread_extent", nthread_bx)

Review comment:
       Doens't seem to make sort faster or more stable.




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