You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/12/21 04:08:44 UTC

[GitHub] [tvm] masahi commented on a change in pull request #7136: [TOPI] Simplify GPU NMS IR and optimize a bit

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



##########
File path: python/tvm/topi/cuda/nms.py
##########
@@ -523,132 +473,112 @@ def calculate_overlap(out_tensor, box_a_idx, box_b_idx):
     max_threads = int(tvm.target.Target.current(allow_none=False).max_num_threads)
 
     with ib.new_scope():
+        nthread_tx = max_threads
+        # num_anchors can be zero
+        nthread_bx = tvm.tir.max(1, ceil_div(num_anchors, max_threads))

Review comment:
       Yeah that sounds good. Added `max` to `scope_attr` method in `ir_builder.py`.




----------------------------------------------------------------
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:
users@infra.apache.org