Skip to content

[RELAY][DYN] Dynamic broadcast_to, zeros, ones - #6007

Merged
zhiics merged 29 commits into
apache:masterfrom
electriclilies:dynamic_broadcast_to
Jul 14, 2020
Merged

[RELAY][DYN] Dynamic broadcast_to, zeros, ones#6007
zhiics merged 29 commits into
apache:masterfrom
electriclilies:dynamic_broadcast_to

Conversation

@electriclilies

@electriclilies electriclilies commented Jul 7, 2020

Copy link
Copy Markdown
Contributor

This PR adds a dynamic version of the relay broadcast_to, zeros and ones OP, and refactors the broadcast_to, zeros, ones OP to be purely static (not dynamic and static combined: undoes some of the refactor in https://github.com/apache/incubator-tvm/pull/5459/files). Also adds broadcast_to, zeros, ones to the dynamic to static conversion pass.

@electriclilies
electriclilies force-pushed the dynamic_broadcast_to branch from 4d66afa to 816784e Compare July 7, 2020 19:03
@tqchen tqchen changed the title Dynamic broadcast_to [RELAY][DYN] Dynamic broadcast_to Jul 7, 2020

@mbrookhart mbrookhart 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.

Thanks, Lily! A few things to clean up.

Comment thread tests/python/relay/test_op_level10.py Outdated
Comment thread tests/python/relay/test_op_level10.py Outdated
Comment thread tests/python/relay/dyn/test_dynamic_op_level10.py
Comment thread src/relay/transforms/pattern_util.h Outdated
Comment thread src/relay/transforms/pattern_util.h Outdated
Comment thread src/relay/transforms/dynamic_to_static.cc Outdated
Comment thread python/tvm/relay/op/dyn/transform.py Outdated
Comment thread src/relay/op/dyn/tensor/transform.cc Outdated

@mbrookhart mbrookhart 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

@electriclilies
electriclilies force-pushed the dynamic_broadcast_to branch from dba1986 to 26f8871 Compare July 9, 2020 18:59
@electriclilies electriclilies changed the title [RELAY][DYN] Dynamic broadcast_to [RELAY][DYN] Dynamic broadcast_to, zeros, ones Jul 9, 2020
@mbrookhart

Copy link
Copy Markdown
Contributor

@zhiics could you take a look?

@zhiics zhiics left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, only a few nitpicks. Please rebase.

Comment thread python/tvm/relay/op/_tensor.py Outdated
Comment thread python/tvm/relay/op/_tensor.py Outdated
@electriclilies

Copy link
Copy Markdown
Contributor Author

@zhiics Rebased and nitpicks fixed!

@zhiics zhiics left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@kevinthesun @icemelon9 Any of you can help take a look as well?

@zhiics

zhiics commented Jul 14, 2020

Copy link
Copy Markdown
Member

@electriclilies Could you modify the code according to the changes in #6047

Lily Orth-Smith added 2 commits July 14, 2020 11:55
@zhiics
zhiics merged commit a23592c into apache:master Jul 14, 2020
@zhiics

zhiics commented Jul 14, 2020

Copy link
Copy Markdown
Member

Thanks @electriclilies @mbrookhart

@electriclilies
electriclilies deleted the dynamic_broadcast_to branch July 14, 2020 22:54
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
* Dynamic BroadcastTo

* fixed lint!

* add test_one_hot() back

* add one_hot registration back

* Dynamic BroadcastTo

* fixed lint!

* add one_hot registration back

* fixed lint.. again

* fixed lint

* lint

* responding to comments

* skipping cuda in dynamic test

* skipping cuda in dynamic test

* fixed i386 test and GPU test

* lint

* starting ones and zeros

* fixed dynamic ones and zeros, wrote dyn ones and zeros test

* added static version of zeros, ones and added a check for size of types to static BroadCastToRel

* added dynamic to static pass for zeros and ones, dynamic test and dynamic to static test

* removed op_str in dyn to static pass test

* fixed lint

* fix lint hopefully

* removed import const

* removed import that was actually used

* copy all attributes from broadcast_to, ones, zeros, full

* responding to comments

* fixed build error

* finishing rebase

* fix lint

Co-authored-by: Lily Orth-Smith <lorthsmith@Lilys-MacBook-Pro.local>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
* Dynamic BroadcastTo

* fixed lint!

* add test_one_hot() back

* add one_hot registration back

* Dynamic BroadcastTo

* fixed lint!

* add one_hot registration back

* fixed lint.. again

* fixed lint

* lint

* responding to comments

* skipping cuda in dynamic test

* skipping cuda in dynamic test

* fixed i386 test and GPU test

* lint

* starting ones and zeros

* fixed dynamic ones and zeros, wrote dyn ones and zeros test

* added static version of zeros, ones and added a check for size of types to static BroadCastToRel

* added dynamic to static pass for zeros and ones, dynamic test and dynamic to static test

* removed op_str in dyn to static pass test

* fixed lint

* fix lint hopefully

* removed import const

* removed import that was actually used

* copy all attributes from broadcast_to, ones, zeros, full

* responding to comments

* fixed build error

* finishing rebase

* fix lint

Co-authored-by: Lily Orth-Smith <lorthsmith@Lilys-MacBook-Pro.local>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Sep 2, 2020
* Dynamic BroadcastTo

* fixed lint!

* add test_one_hot() back

* add one_hot registration back

* Dynamic BroadcastTo

* fixed lint!

* add one_hot registration back

* fixed lint.. again

* fixed lint

* lint

* responding to comments

* skipping cuda in dynamic test

* skipping cuda in dynamic test

* fixed i386 test and GPU test

* lint

* starting ones and zeros

* fixed dynamic ones and zeros, wrote dyn ones and zeros test

* added static version of zeros, ones and added a check for size of types to static BroadCastToRel

* added dynamic to static pass for zeros and ones, dynamic test and dynamic to static test

* removed op_str in dyn to static pass test

* fixed lint

* fix lint hopefully

* removed import const

* removed import that was actually used

* copy all attributes from broadcast_to, ones, zeros, full

* responding to comments

* fixed build error

* finishing rebase

* fix lint

Co-authored-by: Lily Orth-Smith <lorthsmith@Lilys-MacBook-Pro.local>
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Sep 3, 2020
* Dynamic BroadcastTo

* fixed lint!

* add test_one_hot() back

* add one_hot registration back

* Dynamic BroadcastTo

* fixed lint!

* add one_hot registration back

* fixed lint.. again

* fixed lint

* lint

* responding to comments

* skipping cuda in dynamic test

* skipping cuda in dynamic test

* fixed i386 test and GPU test

* lint

* starting ones and zeros

* fixed dynamic ones and zeros, wrote dyn ones and zeros test

* added static version of zeros, ones and added a check for size of types to static BroadCastToRel

* added dynamic to static pass for zeros and ones, dynamic test and dynamic to static test

* removed op_str in dyn to static pass test

* fixed lint

* fix lint hopefully

* removed import const

* removed import that was actually used

* copy all attributes from broadcast_to, ones, zeros, full

* responding to comments

* fixed build error

* finishing rebase

* fix lint

Co-authored-by: Lily Orth-Smith <lorthsmith@Lilys-MacBook-Pro.local>
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