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/28 12:09:05 UTC

[GitHub] [tvm] masahi commented on a change in pull request #7172: [TOPI] Parallelize GPU NMS inner loop

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



##########
File path: python/tvm/topi/cuda/nms.py
##########
@@ -575,6 +593,10 @@ def nms_inner_loop(ib, j):
                         nms_inner_loop(ib, j)
 
             num_valid_boxes[i] = num_valid_boxes_local[0]
+            # TODO(masahi): Want to do this instead of above, but the following is eliminated
+            # during codegen
+            # with ib.if_scope(tx == 0):
+            #     num_valid_boxes[i] = num_valid_boxes_local[0]

Review comment:
       Here, I want to generate the code like this:
   
   ```
   if (threadIdx.x == 0) {
        num_valid_boxes[i] = num_valid_boxes_local[0]
   }
   ```
   but it seems `if_scope(tx == 0)` is eliminated during codegen. I guess this condition is considered a dead code by the simplifier? How can I generate code like this? @tqchen @Laurawly  




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