Skip to content

Commit

Permalink
fix topi vision test by wrapping tir const around int argument
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed Dec 20, 2020
1 parent 5179cf8 commit b70e26c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/tvm/topi/cuda/nms.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,9 @@ def nms_inner_loop(ib, j):
box_indices[i, num_valid_boxes_local[0]] = indices[i, orig_idx]
num_valid_boxes_local[0] += 1

if isinstance(max_output_size, int):
max_output_size = tvm.tir.const(max_output_size)

with ib.if_scope(tvm.tir.all(iou_threshold > 0, valid_count[i] > 0)):
# Apply nms
with ib.for_range(0, valid_count[i]) as j:
Expand Down

0 comments on commit b70e26c

Please sign in to comment.