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

[PatternLang] Add If pattern #7282

Merged
merged 5 commits into from
Jan 14, 2021
Merged

[PatternLang] Add If pattern #7282

merged 5 commits into from
Jan 14, 2021

Conversation

masahi
Copy link
Member

@masahi masahi commented Jan 14, 2021

This is required for my next PyTorch NMS rewrite. I mostly followed the implementations for other language constructs. Comments on doc or tests welcome.

@mbrookhart @comaniac

commit 1ee052fd494a5bdd881c242c3ea0c95cf2a613e5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 22:19:17 2020 +0900

    add comment

commit c846a6999e9c9e48fbc019780e705a990f46cb22
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 21:14:20 2020 +0900

    max_out_size rewrite added to the test

commit 2c7c7fbd0e6563aba694e7fb6baa7bda8e4fadca
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 20:57:55 2020 +0900

    max_out_size rewrite working

commit 319e930acb8162c1ec4a5d4fb71d134580a68f13
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 20:43:16 2020 +0900

    refactor dyn strided slice pattern

commit fb6917b703440748800bde624bc20efaf5798b8a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 11:21:33 2020 +0900

    update NMS pattern following frontend change

commit 255a98f1da8f300d4fe417cce3587c0d71e38ed3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu Dec 24 05:19:31 2020 +0900

    add some comment to explain the pattern

commit 52cea1cc2bff533ca60acfc2416477fc8b058428
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 08:35:14 2020 +0900

    revert tutorial change

commit d3e0e0d7e2427c40067d6ad2680ec5b3f0076223
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 08:02:29 2020 +0900

    test fixed by setting force_surpress=False

commit 2fa1a574f932001be2d8f601338a342dab92f79c
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 07:22:32 2020 +0900

    fixed coord_start

commit 6ba88f27dec1bdb0b0ba746c268591a59264088e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 06:50:46 2020 +0900

    add doc

commit 8d386b6a1c92ce4fe3349ff20e320199a1b5b310
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:27:26 2020 +0900

    updated tutorial

commit 3206b49ecfdd874e0ff8feb0fa586c4c4282f705
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:04:44 2020 +0900

    update object detection test to add rewrite

commit 74bebb2f4376aeb67d8c4aad395f9f2661fe6b3e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:02:15 2020 +0900

    add a pattern to rewrite nms to batched nms

commit f410e6dde0ed949b90312c5a7ddbb6c234f9acc1
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 22:20:16 2020 +0900

    add comment

commit f1e078b0724bd22e7be0a812055e1c7c650d94da
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 19:54:22 2020 +0900

    Add if pattern
Copy link
Contributor

@mbrookhart mbrookhart left a comment

Choose a reason for hiding this comment

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

LGTM. I think you got all of the passes that needed update.

Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

LGTM

@masahi masahi merged commit d7a9a7c into apache:main Jan 14, 2021
@masahi
Copy link
Member Author

masahi commented Jan 14, 2021

Thanks @mbrookhart @comaniac

masahi added a commit to masahi/tvm that referenced this pull request Jan 18, 2021
* Add if pattern

commit 1ee052fd494a5bdd881c242c3ea0c95cf2a613e5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 22:19:17 2020 +0900

    add comment

commit c846a6999e9c9e48fbc019780e705a990f46cb22
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 21:14:20 2020 +0900

    max_out_size rewrite added to the test

commit 2c7c7fbd0e6563aba694e7fb6baa7bda8e4fadca
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 20:57:55 2020 +0900

    max_out_size rewrite working

commit 319e930acb8162c1ec4a5d4fb71d134580a68f13
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 20:43:16 2020 +0900

    refactor dyn strided slice pattern

commit fb6917b703440748800bde624bc20efaf5798b8a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 11:21:33 2020 +0900

    update NMS pattern following frontend change

commit 255a98f1da8f300d4fe417cce3587c0d71e38ed3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu Dec 24 05:19:31 2020 +0900

    add some comment to explain the pattern

commit 52cea1cc2bff533ca60acfc2416477fc8b058428
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 08:35:14 2020 +0900

    revert tutorial change

commit d3e0e0d7e2427c40067d6ad2680ec5b3f0076223
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 08:02:29 2020 +0900

    test fixed by setting force_surpress=False

commit 2fa1a574f932001be2d8f601338a342dab92f79c
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 07:22:32 2020 +0900

    fixed coord_start

commit 6ba88f27dec1bdb0b0ba746c268591a59264088e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 06:50:46 2020 +0900

    add doc

commit 8d386b6a1c92ce4fe3349ff20e320199a1b5b310
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:27:26 2020 +0900

    updated tutorial

commit 3206b49ecfdd874e0ff8feb0fa586c4c4282f705
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:04:44 2020 +0900

    update object detection test to add rewrite

commit 74bebb2f4376aeb67d8c4aad395f9f2661fe6b3e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:02:15 2020 +0900

    add a pattern to rewrite nms to batched nms

commit f410e6dde0ed949b90312c5a7ddbb6c234f9acc1
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 22:20:16 2020 +0900

    add comment

commit f1e078b0724bd22e7be0a812055e1c7c650d94da
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 19:54:22 2020 +0900

    Add if pattern

* add doc

* add test

* doc formatting

* cpplint fix
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Jan 20, 2021
* Add if pattern

commit 1ee052fd494a5bdd881c242c3ea0c95cf2a613e5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 22:19:17 2020 +0900

    add comment

commit c846a6999e9c9e48fbc019780e705a990f46cb22
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 21:14:20 2020 +0900

    max_out_size rewrite added to the test

commit 2c7c7fbd0e6563aba694e7fb6baa7bda8e4fadca
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 20:57:55 2020 +0900

    max_out_size rewrite working

commit 319e930acb8162c1ec4a5d4fb71d134580a68f13
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 20:43:16 2020 +0900

    refactor dyn strided slice pattern

commit fb6917b703440748800bde624bc20efaf5798b8a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 11:21:33 2020 +0900

    update NMS pattern following frontend change

commit 255a98f1da8f300d4fe417cce3587c0d71e38ed3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu Dec 24 05:19:31 2020 +0900

    add some comment to explain the pattern

commit 52cea1cc2bff533ca60acfc2416477fc8b058428
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 08:35:14 2020 +0900

    revert tutorial change

commit d3e0e0d7e2427c40067d6ad2680ec5b3f0076223
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 08:02:29 2020 +0900

    test fixed by setting force_surpress=False

commit 2fa1a574f932001be2d8f601338a342dab92f79c
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 07:22:32 2020 +0900

    fixed coord_start

commit 6ba88f27dec1bdb0b0ba746c268591a59264088e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 06:50:46 2020 +0900

    add doc

commit 8d386b6a1c92ce4fe3349ff20e320199a1b5b310
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:27:26 2020 +0900

    updated tutorial

commit 3206b49ecfdd874e0ff8feb0fa586c4c4282f705
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:04:44 2020 +0900

    update object detection test to add rewrite

commit 74bebb2f4376aeb67d8c4aad395f9f2661fe6b3e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:02:15 2020 +0900

    add a pattern to rewrite nms to batched nms

commit f410e6dde0ed949b90312c5a7ddbb6c234f9acc1
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 22:20:16 2020 +0900

    add comment

commit f1e078b0724bd22e7be0a812055e1c7c650d94da
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 19:54:22 2020 +0900

    Add if pattern

* add doc

* add test

* doc formatting

* cpplint fix
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jan 21, 2021
* Add if pattern

commit 1ee052fd494a5bdd881c242c3ea0c95cf2a613e5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 22:19:17 2020 +0900

    add comment

commit c846a6999e9c9e48fbc019780e705a990f46cb22
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 21:14:20 2020 +0900

    max_out_size rewrite added to the test

commit 2c7c7fbd0e6563aba694e7fb6baa7bda8e4fadca
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 20:57:55 2020 +0900

    max_out_size rewrite working

commit 319e930acb8162c1ec4a5d4fb71d134580a68f13
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 20:43:16 2020 +0900

    refactor dyn strided slice pattern

commit fb6917b703440748800bde624bc20efaf5798b8a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 11:21:33 2020 +0900

    update NMS pattern following frontend change

commit 255a98f1da8f300d4fe417cce3587c0d71e38ed3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu Dec 24 05:19:31 2020 +0900

    add some comment to explain the pattern

commit 52cea1cc2bff533ca60acfc2416477fc8b058428
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 08:35:14 2020 +0900

    revert tutorial change

commit d3e0e0d7e2427c40067d6ad2680ec5b3f0076223
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 08:02:29 2020 +0900

    test fixed by setting force_surpress=False

commit 2fa1a574f932001be2d8f601338a342dab92f79c
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 07:22:32 2020 +0900

    fixed coord_start

commit 6ba88f27dec1bdb0b0ba746c268591a59264088e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 06:50:46 2020 +0900

    add doc

commit 8d386b6a1c92ce4fe3349ff20e320199a1b5b310
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:27:26 2020 +0900

    updated tutorial

commit 3206b49ecfdd874e0ff8feb0fa586c4c4282f705
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:04:44 2020 +0900

    update object detection test to add rewrite

commit 74bebb2f4376aeb67d8c4aad395f9f2661fe6b3e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:02:15 2020 +0900

    add a pattern to rewrite nms to batched nms

commit f410e6dde0ed949b90312c5a7ddbb6c234f9acc1
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 22:20:16 2020 +0900

    add comment

commit f1e078b0724bd22e7be0a812055e1c7c650d94da
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 19:54:22 2020 +0900

    Add if pattern

* add doc

* add test

* doc formatting

* cpplint fix
electriclilies pushed a commit to electriclilies/tvm that referenced this pull request Feb 18, 2021
* Add if pattern

commit 1ee052fd494a5bdd881c242c3ea0c95cf2a613e5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 22:19:17 2020 +0900

    add comment

commit c846a6999e9c9e48fbc019780e705a990f46cb22
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 21:14:20 2020 +0900

    max_out_size rewrite added to the test

commit 2c7c7fbd0e6563aba694e7fb6baa7bda8e4fadca
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 20:57:55 2020 +0900

    max_out_size rewrite working

commit 319e930acb8162c1ec4a5d4fb71d134580a68f13
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 20:43:16 2020 +0900

    refactor dyn strided slice pattern

commit fb6917b703440748800bde624bc20efaf5798b8a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 11:21:33 2020 +0900

    update NMS pattern following frontend change

commit 255a98f1da8f300d4fe417cce3587c0d71e38ed3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu Dec 24 05:19:31 2020 +0900

    add some comment to explain the pattern

commit 52cea1cc2bff533ca60acfc2416477fc8b058428
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 08:35:14 2020 +0900

    revert tutorial change

commit d3e0e0d7e2427c40067d6ad2680ec5b3f0076223
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 08:02:29 2020 +0900

    test fixed by setting force_surpress=False

commit 2fa1a574f932001be2d8f601338a342dab92f79c
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 07:22:32 2020 +0900

    fixed coord_start

commit 6ba88f27dec1bdb0b0ba746c268591a59264088e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 06:50:46 2020 +0900

    add doc

commit 8d386b6a1c92ce4fe3349ff20e320199a1b5b310
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:27:26 2020 +0900

    updated tutorial

commit 3206b49ecfdd874e0ff8feb0fa586c4c4282f705
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:04:44 2020 +0900

    update object detection test to add rewrite

commit 74bebb2f4376aeb67d8c4aad395f9f2661fe6b3e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Dec 23 05:02:15 2020 +0900

    add a pattern to rewrite nms to batched nms

commit f410e6dde0ed949b90312c5a7ddbb6c234f9acc1
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 22:20:16 2020 +0900

    add comment

commit f1e078b0724bd22e7be0a812055e1c7c650d94da
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat Dec 26 19:54:22 2020 +0900

    Add if pattern

* add doc

* add test

* doc formatting

* cpplint fix
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