Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Relay, TF] Support converting TF combined_nms using Relay all_class_nms #8174

Merged
merged 17 commits into from
Jun 4, 2021

Conversation

masahi
Copy link
Member

@masahi masahi commented Jun 2, 2021

A follow up to #7796 adding support for converting TF combined nms using all_class_nms.
https://www.tensorflow.org/api_docs/python/tf/image/combined_non_max_suppression

TF and ONNX require different output format from combined NMS. To support TF, we need to return outputs differently. Coming up with the right output format for TF turned out to be non trivial, but I found the following worked quite well:

  • indices of size (batch_size, num_boxes * num_class, 2)
  • scores of size (batch_size, num_boxes * num_class)
  • num_detections of size (batch_size,)

indices and scores are outputs from the NMS loop, where the selected box indices/scores come first. They are sorted within a class, but not across classes. Since TF combined NMS returns max_total_boxes out of num_boxes * num_class, the frontend code needs to do topk.

One complication is even if num_boxes * num_class < max_total_size, TF returns max_total_size boxes with zero padding. Since topi/relay topk op would not work when the size of the axis to select topk elements from is less then k, we need to conditionally do topk depending on the value of num_boxes. Since things become complicated when num_boxes can be dynamic, I use all_class_nms code path only when num_boxes is static (which should be no problem in practice). Moreover, all_class_nms does not support q != 1 case. So if q != 1 or the number of boxes is dynamic, we still use the old converter.

In addition to expected speed up from parallelizing the NMS loop across different classes, this change enables running TF detection models with graph runtime, since the output from TF combined nms is always of size max_total_size and we no longer need to do dynamic slicing.

please review @trevor-m @anijain2305

@masahi masahi marked this pull request as ready for review June 2, 2021 12:08
@@ -793,6 +793,92 @@ def _impl(inputs, attr, params, mod):
return _impl


def convert_combined_nms_with_all_class_nms(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I want to use this function to rewrite ONNX models, it is defined at the top level and visible from outside.

Copy link
Contributor

@trevor-m trevor-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @masahi, this is great. Some small comments.

python/tvm/relay/frontend/tensorflow.py Outdated Show resolved Hide resolved
python/tvm/topi/transform.py Outdated Show resolved Hide resolved
python/tvm/relay/frontend/tensorflow.py Outdated Show resolved Hide resolved
python/tvm/topi/cuda/nms.py Show resolved Hide resolved
masahi added 17 commits June 3, 2021 09:32
commit c86bcf4
Merge: 0fa8805 da75b2a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 12:13:29 2021 +0900

    Merge branch 'tmp' into all_class_nms_tf

commit 0fa8805
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 06:24:57 2021 +0900

    Revert "handling case when num detections is smaller than max_total_size"

    This reverts commit 61e70b8.

commit 6725150
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:43:06 2021 +0900

    handling case when num detections is smaller than max_total_size

commit 39549aa
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:32:37 2021 +0900

    simplify frontend

commit ca9470b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:25:13 2021 +0900

    update op definition

commit 47bdef9
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 19:47:04 2021 +0900

    remove unnecessary mask

commit 445a7da
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:54:19 2021 +0900

    remove in_buffer

commit 71879b1
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:48:22 2021 +0900

    minor fix

commit 72e055a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:45:37 2021 +0900

    make it more readable

commit a1fe7c4
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:44:14 2021 +0900

    clean up

commit 0c659bf
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:33:54 2021 +0900

    improve sort on cpu

commit 480f6b7
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:29:53 2021 +0900

    collect indices and scores in one kernel

commit 2b441c3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:47:31 2021 +0900

    initialization bug fixed in cuda

commit d43e801
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:23:09 2021 +0900

    cpu nms bug fixed

commit 025010e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 11:09:47 2021 +0900

    add cpu impl

commit 787d839
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:38:20 2021 +0900

    refactoring

commit 0540430
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:03:51 2021 +0900

    initial import

    commit 5ff0985625ec75f117af37017ebf4089dafb8a46
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:02:45 2021 +0900

        cleanup

    commit 199f9b6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:00:15 2021 +0900

        Revert "add gather_nd shape func"

        This reverts commit 1ff4d53.

    commit 47a05c4
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:53:00 2021 +0900

        format

    commit 9dcd0f0
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:48:43 2021 +0900

        make it static

    commit eb06393
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:14:31 2021 +0900

        restore old impl and use it for q != 1 case

    commit 115a5df
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:00:40 2021 +0900

        fixed score gathering

    commit d203562
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 08:53:14 2021 +0900

        minimum fixed

    commit 3fe91e8
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 06:59:39 2021 +0900

        batch issue fixed

    commit 19e3e84
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:29:15 2021 +0900

        zero padding working

        This reverts commit 58c3413.

    commit ce7848b
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:12:47 2021 +0900

        pylint, do not use -1 for default value

    commit 968f3bd
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:07:31 2021 +0900

        rename to index_rank and make it Optional

    commit 9e06b84
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 18:01:59 2021 +0900

        fix pylint

    commit 81dc605
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:57:03 2021 +0900

        minor fix

    commit 54297b6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:54:16 2021 +0900

        support dynamic scatter nd

    commit e25c225
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:33:19 2021 +0900

        gather_dim -> num_indices_per_tuple

    commit aaa6211
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:23:46 2021 +0900

        add dynamic gather_nd test

    commit 3a9fe5d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:18:26 2021 +0900

        refactor gather_nd ref funcs

    commit 1ff4d53
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 14:36:34 2021 +0900

        add gather_nd shape func

    commit b020064
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:01:11 2021 +0900

        working on zero padding

    commit 4567417
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 03:21:52 2021 +0900

        working

    commit 7f5c76d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 02:37:50 2021 +0900

        relay type inference works, debugging topi

    commit 4a4b8df
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 15:08:16 2021 +0900

        add max_total_size to attributes

    commit 7218b2f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:50:58 2021 +0900

        tf frontend update

    commit cde4a1f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:17:14 2021 +0900

        all class nms tf mode first cut

    commit 5f349f7
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 06:54:34 2021 +0900

        begin supporting per batch output

    commit 0044365
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Mon May 3 19:46:28 2021 +0000

        initial

    commit 168a617
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Fri Apr 16 20:31:32 2021 +0000

        initia;
        l

commit da75b2a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:58:19 2021 +0900

    do minimum in topi

commit 52c5e8a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:54:49 2021 +0900

    more simplify

commit 44d88cd
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:51:39 2021 +0900

    simplify

commit 74e1917
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:39:37 2021 +0900

    black

commit fc3a38e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:37:30 2021 +0900

    minor change

commit f88e2a3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:14:54 2021 +0900

    minor refactor

commit f2d7ed4
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:08:47 2021 +0900

    support the case when there is not enough box

commit 0f184a6
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 06:24:16 2021 +0900

    Revert "handling case when num detections is smaller than max_total_size"

    This reverts commit 61e70b8.

commit d7180f2
Merge: 61e70b8 06ac205
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:43:37 2021 +0900

    Merge branch 'gather_nd_shape_func' into tmp

commit 61e70b8
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:43:06 2021 +0900

    handling case when num detections is smaller than max_total_size

commit 453a79b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:32:37 2021 +0900

    simplify frontend

commit 2fc5f1e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:25:13 2021 +0900

    update op definition

commit 8afbd30
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 19:47:04 2021 +0900

    remove unnecessary mask

commit ff870f7
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:54:19 2021 +0900

    remove in_buffer

commit e71b922
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:48:22 2021 +0900

    minor fix

commit b02faae
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:45:37 2021 +0900

    make it more readable

commit 6baee99
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:44:14 2021 +0900

    clean up

commit 7a2a2df
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:33:54 2021 +0900

    improve sort on cpu

commit afad2a2
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:29:53 2021 +0900

    collect indices and scores in one kernel

commit c5718e2
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:47:31 2021 +0900

    initialization bug fixed in cuda

commit 5623e3f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:23:09 2021 +0900

    cpu nms bug fixed

commit c40eaec
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 11:09:47 2021 +0900

    add cpu impl

commit 6c7aaeb
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:38:20 2021 +0900

    refactoring

commit 7b87922
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:03:51 2021 +0900

    initial import

    commit 5ff0985625ec75f117af37017ebf4089dafb8a46
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:02:45 2021 +0900

        cleanup

    commit 199f9b6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:00:15 2021 +0900

        Revert "add gather_nd shape func"

        This reverts commit 1ff4d53.

    commit 47a05c4
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:53:00 2021 +0900

        format

    commit 9dcd0f0
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:48:43 2021 +0900

        make it static

    commit eb06393
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:14:31 2021 +0900

        restore old impl and use it for q != 1 case

    commit 115a5df
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:00:40 2021 +0900

        fixed score gathering

    commit d203562
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 08:53:14 2021 +0900

        minimum fixed

    commit 3fe91e8
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 06:59:39 2021 +0900

        batch issue fixed

    commit 19e3e84
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:29:15 2021 +0900

        zero padding working

        This reverts commit 58c3413.

    commit ce7848b
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:12:47 2021 +0900

        pylint, do not use -1 for default value

    commit 968f3bd
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:07:31 2021 +0900

        rename to index_rank and make it Optional

    commit 9e06b84
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 18:01:59 2021 +0900

        fix pylint

    commit 81dc605
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:57:03 2021 +0900

        minor fix

    commit 54297b6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:54:16 2021 +0900

        support dynamic scatter nd

    commit e25c225
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:33:19 2021 +0900

        gather_dim -> num_indices_per_tuple

    commit aaa6211
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:23:46 2021 +0900

        add dynamic gather_nd test

    commit 3a9fe5d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:18:26 2021 +0900

        refactor gather_nd ref funcs

    commit 1ff4d53
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 14:36:34 2021 +0900

        add gather_nd shape func

    commit b020064
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:01:11 2021 +0900

        working on zero padding

    commit 4567417
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 03:21:52 2021 +0900

        working

    commit 7f5c76d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 02:37:50 2021 +0900

        relay type inference works, debugging topi

    commit 4a4b8df
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 15:08:16 2021 +0900

        add max_total_size to attributes

    commit 7218b2f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:50:58 2021 +0900

        tf frontend update

    commit cde4a1f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:17:14 2021 +0900

        all class nms tf mode first cut

    commit 5f349f7
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 06:54:34 2021 +0900

        begin supporting per batch output

    commit 0044365
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Mon May 3 19:46:28 2021 +0000

        initial

    commit 168a617
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Fri Apr 16 20:31:32 2021 +0000

        initia;
        l

commit 06ac205
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 28 13:12:47 2021 +0900

    pylint, do not use -1 for default value

commit 2adc426
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 28 13:07:31 2021 +0900

    rename to index_rank and make it Optional

commit c458da6
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 18:01:59 2021 +0900

    fix pylint

commit b7faf0f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:57:03 2021 +0900

    minor fix

commit c031641
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:54:16 2021 +0900

    support dynamic scatter nd

commit 56f3f0e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:33:19 2021 +0900

    gather_dim -> num_indices_per_tuple

commit 081823b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:23:46 2021 +0900

    add dynamic gather_nd test

commit 6b2655b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:18:26 2021 +0900

    refactor gather_nd ref funcs

commit f9f5dfb
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 14:36:34 2021 +0900

    add gather_nd shape func
Copy link
Contributor

@trevor-m trevor-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @masahi, it looks good to me now.

Initial results for TF SSD Mobilenet v1 on T4 GPU are giving me 4.56 ms. It is not quite an apples to apples comparison with the previous implementation though, so I will come back with more data soon.

@masahi
Copy link
Member Author

masahi commented Jun 3, 2021

Interesting. I'd be curious to know why it is not going faster than the previous implementation.

If you can dump the input boxes and scores to TF combined nms, I can look at the performance difference via a standalone NMS workload. I can do that very easily for PT but no idea for TF.

@trevor-m
Copy link
Contributor

trevor-m commented Jun 3, 2021

The input shapes are boxes=(1, 1917, 1, 4) and scores=(1, 1917, 91).

Here are some more numbers for TF SSD Mobilenet v1.

Implementation Thrust Latency (ms)
Previous Yes 3.41
Previous No 3.85
New Yes 4.56
New No 2.98

It looks like without thrust this implementation is much faster!

Even if we are unable to improve the thrust performance in this PR, I still prefer this new implementation because of the static shapes. The performance is still much better than TF anyway which is ~6ms.

@masahi
Copy link
Member Author

masahi commented Jun 3, 2021

lol thrust is the bottleneck now? Note that our TVM-native sorting performance is quite good thanks to #7611, and it works equally well on dynamic inputs, so thrust is no longer a requirement for good performance. Also the new implementation does not call get_valid_count, which uses thrust for exclusive scan on relatively large input (total number of boxes, which in our case num_boxes * num_class).

I see that the number of boxes is quite small in your model, I believe the new implementation would be much faster when the number of boxes is large. Do you have other models, preferably the one with more input boxes?

I've been testing tf2 models from https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md, their ssd mv2 model (FPNLite 320x320) has 12480 boxes, and ssd resnet 50 v1 has more than 50000, and efficient det2 has 110484 boxes.

@masahi
Copy link
Member Author

masahi commented Jun 4, 2021

@trevor-m Also it is worth trying out the graph runtime for the new implementation, since there is no dynamic shape after NMS.

Thrust numbers actually make sense given that now we are running sort on (batch * class, num_boxes) along the second axis. Since batched sort with thrust is implemented via two calls to stable sort, when the axis to sort is small the overhead from the two calls become relatively big. And for small sort, TVM's sort should be faster than Thrust.

In contrast, the previous implementation does sort on (batch, num_boxes * class) along the second axis, so Thrust sort is fast.

@tqchen
Copy link
Member

tqchen commented Jun 4, 2021

@trevor-m please help manage this PR, you should get merge permission once the ASF account linking is setup

@masahi
Copy link
Member Author

masahi commented Jun 4, 2021

@trevor-m you should be able to merge now.

@trevor-m
Copy link
Contributor

trevor-m commented Jun 4, 2021

@trevor-m Also it is worth trying out the graph runtime for the new implementation, since there is no dynamic shape after NMS.

Thrust numbers actually make sense given that now we are running sort on (batch * class, num_boxes) along the second axis. Since batched sort with thrust is implemented via two calls to stable sort, when the axis to sort is small the overhead from the two calls become relatively big. And for small sort, TVM's sort should be faster than Thrust.

In contrast, the previous implementation does sort on (batch, num_boxes * class) along the second axis, so Thrust sort is fast.

I see, that makes sense.

I was using the models from https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1_detection_zoo.md
I think these ones still cannot use graph runtime because there is a loop at the beginning.

@trevor-m trevor-m merged commit f4ec5fd into apache:main Jun 4, 2021
@trevor-m
Copy link
Contributor

trevor-m commented Jun 4, 2021

Thanks @masahi !

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Jun 17, 2021
…nms (apache#8174)

* import from branch

commit c86bcf4
Merge: 0fa8805 da75b2a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 12:13:29 2021 +0900

    Merge branch 'tmp' into all_class_nms_tf

commit 0fa8805
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 06:24:57 2021 +0900

    Revert "handling case when num detections is smaller than max_total_size"

    This reverts commit 61e70b8.

commit 6725150
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:43:06 2021 +0900

    handling case when num detections is smaller than max_total_size

commit 39549aa
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:32:37 2021 +0900

    simplify frontend

commit ca9470b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:25:13 2021 +0900

    update op definition

commit 47bdef9
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 19:47:04 2021 +0900

    remove unnecessary mask

commit 445a7da
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:54:19 2021 +0900

    remove in_buffer

commit 71879b1
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:48:22 2021 +0900

    minor fix

commit 72e055a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:45:37 2021 +0900

    make it more readable

commit a1fe7c4
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:44:14 2021 +0900

    clean up

commit 0c659bf
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:33:54 2021 +0900

    improve sort on cpu

commit 480f6b7
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:29:53 2021 +0900

    collect indices and scores in one kernel

commit 2b441c3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:47:31 2021 +0900

    initialization bug fixed in cuda

commit d43e801
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:23:09 2021 +0900

    cpu nms bug fixed

commit 025010e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 11:09:47 2021 +0900

    add cpu impl

commit 787d839
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:38:20 2021 +0900

    refactoring

commit 0540430
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:03:51 2021 +0900

    initial import

    commit 5ff0985625ec75f117af37017ebf4089dafb8a46
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:02:45 2021 +0900

        cleanup

    commit 199f9b6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:00:15 2021 +0900

        Revert "add gather_nd shape func"

        This reverts commit 1ff4d53.

    commit 47a05c4
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:53:00 2021 +0900

        format

    commit 9dcd0f0
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:48:43 2021 +0900

        make it static

    commit eb06393
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:14:31 2021 +0900

        restore old impl and use it for q != 1 case

    commit 115a5df
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:00:40 2021 +0900

        fixed score gathering

    commit d203562
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 08:53:14 2021 +0900

        minimum fixed

    commit 3fe91e8
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 06:59:39 2021 +0900

        batch issue fixed

    commit 19e3e84
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:29:15 2021 +0900

        zero padding working

        This reverts commit 58c3413.

    commit ce7848b
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:12:47 2021 +0900

        pylint, do not use -1 for default value

    commit 968f3bd
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:07:31 2021 +0900

        rename to index_rank and make it Optional

    commit 9e06b84
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 18:01:59 2021 +0900

        fix pylint

    commit 81dc605
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:57:03 2021 +0900

        minor fix

    commit 54297b6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:54:16 2021 +0900

        support dynamic scatter nd

    commit e25c225
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:33:19 2021 +0900

        gather_dim -> num_indices_per_tuple

    commit aaa6211
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:23:46 2021 +0900

        add dynamic gather_nd test

    commit 3a9fe5d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:18:26 2021 +0900

        refactor gather_nd ref funcs

    commit 1ff4d53
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 14:36:34 2021 +0900

        add gather_nd shape func

    commit b020064
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:01:11 2021 +0900

        working on zero padding

    commit 4567417
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 03:21:52 2021 +0900

        working

    commit 7f5c76d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 02:37:50 2021 +0900

        relay type inference works, debugging topi

    commit 4a4b8df
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 15:08:16 2021 +0900

        add max_total_size to attributes

    commit 7218b2f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:50:58 2021 +0900

        tf frontend update

    commit cde4a1f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:17:14 2021 +0900

        all class nms tf mode first cut

    commit 5f349f7
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 06:54:34 2021 +0900

        begin supporting per batch output

    commit 0044365
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Mon May 3 19:46:28 2021 +0000

        initial

    commit 168a617
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Fri Apr 16 20:31:32 2021 +0000

        initia;
        l

commit da75b2a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:58:19 2021 +0900

    do minimum in topi

commit 52c5e8a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:54:49 2021 +0900

    more simplify

commit 44d88cd
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:51:39 2021 +0900

    simplify

commit 74e1917
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:39:37 2021 +0900

    black

commit fc3a38e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:37:30 2021 +0900

    minor change

commit f88e2a3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:14:54 2021 +0900

    minor refactor

commit f2d7ed4
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:08:47 2021 +0900

    support the case when there is not enough box

commit 0f184a6
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 06:24:16 2021 +0900

    Revert "handling case when num detections is smaller than max_total_size"

    This reverts commit 61e70b8.

commit d7180f2
Merge: 61e70b8 06ac205
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:43:37 2021 +0900

    Merge branch 'gather_nd_shape_func' into tmp

commit 61e70b8
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:43:06 2021 +0900

    handling case when num detections is smaller than max_total_size

commit 453a79b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:32:37 2021 +0900

    simplify frontend

commit 2fc5f1e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:25:13 2021 +0900

    update op definition

commit 8afbd30
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 19:47:04 2021 +0900

    remove unnecessary mask

commit ff870f7
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:54:19 2021 +0900

    remove in_buffer

commit e71b922
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:48:22 2021 +0900

    minor fix

commit b02faae
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:45:37 2021 +0900

    make it more readable

commit 6baee99
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:44:14 2021 +0900

    clean up

commit 7a2a2df
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:33:54 2021 +0900

    improve sort on cpu

commit afad2a2
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:29:53 2021 +0900

    collect indices and scores in one kernel

commit c5718e2
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:47:31 2021 +0900

    initialization bug fixed in cuda

commit 5623e3f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:23:09 2021 +0900

    cpu nms bug fixed

commit c40eaec
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 11:09:47 2021 +0900

    add cpu impl

commit 6c7aaeb
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:38:20 2021 +0900

    refactoring

commit 7b87922
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:03:51 2021 +0900

    initial import

    commit 5ff0985625ec75f117af37017ebf4089dafb8a46
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:02:45 2021 +0900

        cleanup

    commit 199f9b6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:00:15 2021 +0900

        Revert "add gather_nd shape func"

        This reverts commit 1ff4d53.

    commit 47a05c4
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:53:00 2021 +0900

        format

    commit 9dcd0f0
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:48:43 2021 +0900

        make it static

    commit eb06393
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:14:31 2021 +0900

        restore old impl and use it for q != 1 case

    commit 115a5df
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:00:40 2021 +0900

        fixed score gathering

    commit d203562
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 08:53:14 2021 +0900

        minimum fixed

    commit 3fe91e8
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 06:59:39 2021 +0900

        batch issue fixed

    commit 19e3e84
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:29:15 2021 +0900

        zero padding working

        This reverts commit 58c3413.

    commit ce7848b
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:12:47 2021 +0900

        pylint, do not use -1 for default value

    commit 968f3bd
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:07:31 2021 +0900

        rename to index_rank and make it Optional

    commit 9e06b84
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 18:01:59 2021 +0900

        fix pylint

    commit 81dc605
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:57:03 2021 +0900

        minor fix

    commit 54297b6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:54:16 2021 +0900

        support dynamic scatter nd

    commit e25c225
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:33:19 2021 +0900

        gather_dim -> num_indices_per_tuple

    commit aaa6211
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:23:46 2021 +0900

        add dynamic gather_nd test

    commit 3a9fe5d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:18:26 2021 +0900

        refactor gather_nd ref funcs

    commit 1ff4d53
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 14:36:34 2021 +0900

        add gather_nd shape func

    commit b020064
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:01:11 2021 +0900

        working on zero padding

    commit 4567417
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 03:21:52 2021 +0900

        working

    commit 7f5c76d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 02:37:50 2021 +0900

        relay type inference works, debugging topi

    commit 4a4b8df
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 15:08:16 2021 +0900

        add max_total_size to attributes

    commit 7218b2f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:50:58 2021 +0900

        tf frontend update

    commit cde4a1f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:17:14 2021 +0900

        all class nms tf mode first cut

    commit 5f349f7
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 06:54:34 2021 +0900

        begin supporting per batch output

    commit 0044365
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Mon May 3 19:46:28 2021 +0000

        initial

    commit 168a617
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Fri Apr 16 20:31:32 2021 +0000

        initia;
        l

commit 06ac205
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 28 13:12:47 2021 +0900

    pylint, do not use -1 for default value

commit 2adc426
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 28 13:07:31 2021 +0900

    rename to index_rank and make it Optional

commit c458da6
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 18:01:59 2021 +0900

    fix pylint

commit b7faf0f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:57:03 2021 +0900

    minor fix

commit c031641
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:54:16 2021 +0900

    support dynamic scatter nd

commit 56f3f0e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:33:19 2021 +0900

    gather_dim -> num_indices_per_tuple

commit 081823b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:23:46 2021 +0900

    add dynamic gather_nd test

commit 6b2655b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:18:26 2021 +0900

    refactor gather_nd ref funcs

commit f9f5dfb
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 14:36:34 2021 +0900

    add gather_nd shape func

* make combined nms converter public

* do topk on smaller score tensor

* update tests

* remove max_total_size attribute, do minimum in relay side

* fix topk

* update relay doc

* update doc

* fix pylint

* update shape func for tf mode and add test

* name change

* reject dynamic inputs

* revert gather_nd change

* do not try to support dynamic batch size in tile rep

* check batch_size is int

* fix dtype issue in scan

* fix slicing before topk
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jun 17, 2021
…nms (apache#8174)

* import from branch

commit c86bcf4
Merge: 0fa8805 da75b2a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 12:13:29 2021 +0900

    Merge branch 'tmp' into all_class_nms_tf

commit 0fa8805
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 06:24:57 2021 +0900

    Revert "handling case when num detections is smaller than max_total_size"

    This reverts commit 61e70b8.

commit 6725150
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:43:06 2021 +0900

    handling case when num detections is smaller than max_total_size

commit 39549aa
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:32:37 2021 +0900

    simplify frontend

commit ca9470b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:25:13 2021 +0900

    update op definition

commit 47bdef9
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 19:47:04 2021 +0900

    remove unnecessary mask

commit 445a7da
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:54:19 2021 +0900

    remove in_buffer

commit 71879b1
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:48:22 2021 +0900

    minor fix

commit 72e055a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:45:37 2021 +0900

    make it more readable

commit a1fe7c4
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:44:14 2021 +0900

    clean up

commit 0c659bf
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:33:54 2021 +0900

    improve sort on cpu

commit 480f6b7
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:29:53 2021 +0900

    collect indices and scores in one kernel

commit 2b441c3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:47:31 2021 +0900

    initialization bug fixed in cuda

commit d43e801
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:23:09 2021 +0900

    cpu nms bug fixed

commit 025010e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 11:09:47 2021 +0900

    add cpu impl

commit 787d839
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:38:20 2021 +0900

    refactoring

commit 0540430
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:03:51 2021 +0900

    initial import

    commit 5ff0985625ec75f117af37017ebf4089dafb8a46
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:02:45 2021 +0900

        cleanup

    commit 199f9b6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:00:15 2021 +0900

        Revert "add gather_nd shape func"

        This reverts commit 1ff4d53.

    commit 47a05c4
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:53:00 2021 +0900

        format

    commit 9dcd0f0
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:48:43 2021 +0900

        make it static

    commit eb06393
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:14:31 2021 +0900

        restore old impl and use it for q != 1 case

    commit 115a5df
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:00:40 2021 +0900

        fixed score gathering

    commit d203562
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 08:53:14 2021 +0900

        minimum fixed

    commit 3fe91e8
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 06:59:39 2021 +0900

        batch issue fixed

    commit 19e3e84
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:29:15 2021 +0900

        zero padding working

        This reverts commit 58c3413.

    commit ce7848b
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:12:47 2021 +0900

        pylint, do not use -1 for default value

    commit 968f3bd
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:07:31 2021 +0900

        rename to index_rank and make it Optional

    commit 9e06b84
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 18:01:59 2021 +0900

        fix pylint

    commit 81dc605
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:57:03 2021 +0900

        minor fix

    commit 54297b6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:54:16 2021 +0900

        support dynamic scatter nd

    commit e25c225
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:33:19 2021 +0900

        gather_dim -> num_indices_per_tuple

    commit aaa6211
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:23:46 2021 +0900

        add dynamic gather_nd test

    commit 3a9fe5d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:18:26 2021 +0900

        refactor gather_nd ref funcs

    commit 1ff4d53
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 14:36:34 2021 +0900

        add gather_nd shape func

    commit b020064
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:01:11 2021 +0900

        working on zero padding

    commit 4567417
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 03:21:52 2021 +0900

        working

    commit 7f5c76d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 02:37:50 2021 +0900

        relay type inference works, debugging topi

    commit 4a4b8df
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 15:08:16 2021 +0900

        add max_total_size to attributes

    commit 7218b2f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:50:58 2021 +0900

        tf frontend update

    commit cde4a1f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:17:14 2021 +0900

        all class nms tf mode first cut

    commit 5f349f7
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 06:54:34 2021 +0900

        begin supporting per batch output

    commit 0044365
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Mon May 3 19:46:28 2021 +0000

        initial

    commit 168a617
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Fri Apr 16 20:31:32 2021 +0000

        initia;
        l

commit da75b2a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:58:19 2021 +0900

    do minimum in topi

commit 52c5e8a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:54:49 2021 +0900

    more simplify

commit 44d88cd
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:51:39 2021 +0900

    simplify

commit 74e1917
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:39:37 2021 +0900

    black

commit fc3a38e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:37:30 2021 +0900

    minor change

commit f88e2a3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:14:54 2021 +0900

    minor refactor

commit f2d7ed4
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:08:47 2021 +0900

    support the case when there is not enough box

commit 0f184a6
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 06:24:16 2021 +0900

    Revert "handling case when num detections is smaller than max_total_size"

    This reverts commit 61e70b8.

commit d7180f2
Merge: 61e70b8 06ac205
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:43:37 2021 +0900

    Merge branch 'gather_nd_shape_func' into tmp

commit 61e70b8
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:43:06 2021 +0900

    handling case when num detections is smaller than max_total_size

commit 453a79b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:32:37 2021 +0900

    simplify frontend

commit 2fc5f1e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:25:13 2021 +0900

    update op definition

commit 8afbd30
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 19:47:04 2021 +0900

    remove unnecessary mask

commit ff870f7
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:54:19 2021 +0900

    remove in_buffer

commit e71b922
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:48:22 2021 +0900

    minor fix

commit b02faae
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:45:37 2021 +0900

    make it more readable

commit 6baee99
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:44:14 2021 +0900

    clean up

commit 7a2a2df
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:33:54 2021 +0900

    improve sort on cpu

commit afad2a2
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:29:53 2021 +0900

    collect indices and scores in one kernel

commit c5718e2
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:47:31 2021 +0900

    initialization bug fixed in cuda

commit 5623e3f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:23:09 2021 +0900

    cpu nms bug fixed

commit c40eaec
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 11:09:47 2021 +0900

    add cpu impl

commit 6c7aaeb
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:38:20 2021 +0900

    refactoring

commit 7b87922
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:03:51 2021 +0900

    initial import

    commit 5ff0985625ec75f117af37017ebf4089dafb8a46
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:02:45 2021 +0900

        cleanup

    commit 199f9b6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:00:15 2021 +0900

        Revert "add gather_nd shape func"

        This reverts commit 1ff4d53.

    commit 47a05c4
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:53:00 2021 +0900

        format

    commit 9dcd0f0
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:48:43 2021 +0900

        make it static

    commit eb06393
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:14:31 2021 +0900

        restore old impl and use it for q != 1 case

    commit 115a5df
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:00:40 2021 +0900

        fixed score gathering

    commit d203562
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 08:53:14 2021 +0900

        minimum fixed

    commit 3fe91e8
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 06:59:39 2021 +0900

        batch issue fixed

    commit 19e3e84
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:29:15 2021 +0900

        zero padding working

        This reverts commit 58c3413.

    commit ce7848b
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:12:47 2021 +0900

        pylint, do not use -1 for default value

    commit 968f3bd
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:07:31 2021 +0900

        rename to index_rank and make it Optional

    commit 9e06b84
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 18:01:59 2021 +0900

        fix pylint

    commit 81dc605
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:57:03 2021 +0900

        minor fix

    commit 54297b6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:54:16 2021 +0900

        support dynamic scatter nd

    commit e25c225
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:33:19 2021 +0900

        gather_dim -> num_indices_per_tuple

    commit aaa6211
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:23:46 2021 +0900

        add dynamic gather_nd test

    commit 3a9fe5d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:18:26 2021 +0900

        refactor gather_nd ref funcs

    commit 1ff4d53
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 14:36:34 2021 +0900

        add gather_nd shape func

    commit b020064
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:01:11 2021 +0900

        working on zero padding

    commit 4567417
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 03:21:52 2021 +0900

        working

    commit 7f5c76d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 02:37:50 2021 +0900

        relay type inference works, debugging topi

    commit 4a4b8df
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 15:08:16 2021 +0900

        add max_total_size to attributes

    commit 7218b2f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:50:58 2021 +0900

        tf frontend update

    commit cde4a1f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:17:14 2021 +0900

        all class nms tf mode first cut

    commit 5f349f7
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 06:54:34 2021 +0900

        begin supporting per batch output

    commit 0044365
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Mon May 3 19:46:28 2021 +0000

        initial

    commit 168a617
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Fri Apr 16 20:31:32 2021 +0000

        initia;
        l

commit 06ac205
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 28 13:12:47 2021 +0900

    pylint, do not use -1 for default value

commit 2adc426
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 28 13:07:31 2021 +0900

    rename to index_rank and make it Optional

commit c458da6
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 18:01:59 2021 +0900

    fix pylint

commit b7faf0f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:57:03 2021 +0900

    minor fix

commit c031641
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:54:16 2021 +0900

    support dynamic scatter nd

commit 56f3f0e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:33:19 2021 +0900

    gather_dim -> num_indices_per_tuple

commit 081823b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:23:46 2021 +0900

    add dynamic gather_nd test

commit 6b2655b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:18:26 2021 +0900

    refactor gather_nd ref funcs

commit f9f5dfb
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 14:36:34 2021 +0900

    add gather_nd shape func

* make combined nms converter public

* do topk on smaller score tensor

* update tests

* remove max_total_size attribute, do minimum in relay side

* fix topk

* update relay doc

* update doc

* fix pylint

* update shape func for tf mode and add test

* name change

* reject dynamic inputs

* revert gather_nd change

* do not try to support dynamic batch size in tile rep

* check batch_size is int

* fix dtype issue in scan

* fix slicing before topk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants