Skip to content

[PatternLang] Add a relay LetPattern - #7332

Merged
masahi merged 3 commits into
apache:mainfrom
mbrookhart:let_pattern
Jan 23, 2021
Merged

[PatternLang] Add a relay LetPattern#7332
masahi merged 3 commits into
apache:mainfrom
mbrookhart:let_pattern

Conversation

@mbrookhart

Copy link
Copy Markdown
Contributor

I found myself needing a Let pattern for some object detection work. Thanks for taking a look!

@mbrookhart
mbrookhart requested review from comaniac and masahi January 23, 2021 00:06

@comaniac comaniac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Just a few typos.

Comment thread python/tvm/relay/dataflow_pattern/__init__.py Outdated
Comment thread python/tvm/relay/dataflow_pattern/__init__.py Outdated
@masahi

masahi commented Jan 23, 2021

Copy link
Copy Markdown
Member

I wonder, do we need to match against the let bound variable? Isn't it always Var? Not sure if relay Let supports pattern destructing on let lhs, like let (x, y) = ... in body

@mbrookhart

mbrookhart commented Jan 23, 2021

Copy link
Copy Markdown
Contributor Author

@masahi I agree the Expr will always be a var, but I wanted to let users match on more complicated attributes like name/dtype/shape/etc, so I left it a general in pattern

Matthew Brookhart and others added 2 commits January 22, 2021 19:12
Co-authored-by: Cody Yu <comaniac0422@gmail.com>
Co-authored-by: Cody Yu <comaniac0422@gmail.com>
@masahi
masahi merged commit e889def into apache:main Jan 23, 2021
@masahi

masahi commented Jan 23, 2021

Copy link
Copy Markdown
Member

Thanks @mbrookhart @comaniac

alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 11, 2021
* Add a relay LetPattern

* fix If copy

Co-authored-by: Cody Yu <comaniac0422@gmail.com>

* fix If copy

Co-authored-by: Cody Yu <comaniac0422@gmail.com>

Co-authored-by: Cody Yu <comaniac0422@gmail.com>
electriclilies pushed a commit to electriclilies/tvm that referenced this pull request Feb 18, 2021
* Add a relay LetPattern

* fix If copy

Co-authored-by: Cody Yu <comaniac0422@gmail.com>

* fix If copy

Co-authored-by: Cody Yu <comaniac0422@gmail.com>

Co-authored-by: Cody Yu <comaniac0422@gmail.com>
Lokiiiiii pushed a commit to Lokiiiiii/tvm that referenced this pull request Mar 2, 2021
* Add a relay LetPattern

* fix If copy

Co-authored-by: Cody Yu <comaniac0422@gmail.com>

* fix If copy

Co-authored-by: Cody Yu <comaniac0422@gmail.com>

Co-authored-by: Cody Yu <comaniac0422@gmail.com>
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Mar 2, 2021
* Add a relay LetPattern

* fix If copy

Co-authored-by: Cody Yu <comaniac0422@gmail.com>

* fix If copy

Co-authored-by: Cody Yu <comaniac0422@gmail.com>

Co-authored-by: Cody Yu <comaniac0422@gmail.com>
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