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:
[email protected]


Reply via email to