From 983edf5948731efd8a88c91ed4eaa29cd61eaf6e Mon Sep 17 00:00:00 2001 From: Matthew Barrett Date: Wed, 11 Dec 2019 09:54:34 +0000 Subject: [PATCH] [TOPI] Fixed nms max_output_size loop One of the loops in hybrid_nms used for performing the max_output_size reordering was incorrectly designated as parallel resulting in incorrect behaviour. This patch changes that loop to a serial loop. Change-Id: I97184f5887f5f028d8ab339fa2808eb7630a4017 --- topi/python/topi/vision/nms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topi/python/topi/vision/nms.py b/topi/python/topi/vision/nms.py index 0d20095abd74..5bb36f7dfa74 100644 --- a/topi/python/topi/vision/nms.py +++ b/topi/python/topi/vision/nms.py @@ -278,7 +278,7 @@ def hybrid_nms(data, sorted_index, valid_count, # Only return max_output_size valid boxes num_valid_boxes = 0 if max_output_size > 0: - for j in parallel(valid_count[i]): + for j in range(valid_count[i]): if output[i, j, 0] >= zero: if num_valid_boxes == max_output_size: for k in range(box_data_length):