Skip to content

Commit

Permalink
revert PR#2420 nms changes (apache#2747)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurawly authored and wweic committed Mar 12, 2019
1 parent f01c50d commit 0ef2fe4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions topi/python/topi/cuda/nms.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def sort_ir(data, index, output):
p_index = ib.buffer_ptr(index)
p_out = ib.buffer_ptr(output)
nthread_tx = max_threads
nthread_bx = (num_anchors + 1) // 2 // max_threads + 1
nthread_bx = num_anchors // max_threads + 1
tx = tvm.thread_axis("threadIdx.x")
bx = tvm.thread_axis("vthread")
ib.scope_attr(tx, "thread_extent", nthread_tx)
Expand All @@ -46,10 +46,8 @@ def sort_ir(data, index, output):

with ib.for_range(0, batch, for_type="unroll") as b:
start = b * num_anchors
for i in range(2):
bbox_id = tid * 2 + i
with ib.if_scope(bbox_id < num_anchors):
p_out[start + bbox_id] = bbox_id
with ib.if_scope(tid < num_anchors):
p_out[start + tid] = tid
# OddEvenTransposeSort
with ib.for_range(0, p_index[b]) as k:
with ib.if_scope(tid < (p_index[b] + 1) // 2):
Expand Down

0 comments on commit 0ef2fe4

Please sign in to comment.