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][DYN] Dynamic broadcast_to, zeros, ones #6007

Merged
merged 29 commits into from
Jul 14, 2020

Conversation

electriclilies
Copy link
Contributor

@electriclilies electriclilies commented Jul 7, 2020

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

Thanks, Lily! A few things to clean up.

tests/python/relay/test_op_level10.py Outdated Show resolved Hide resolved
tests/python/relay/test_op_level10.py Outdated Show resolved Hide resolved
tests/python/relay/dyn/test_dynamic_op_level10.py Outdated Show resolved Hide resolved
src/relay/transforms/pattern_util.h Outdated Show resolved Hide resolved
src/relay/transforms/pattern_util.h Outdated Show resolved Hide resolved
src/relay/transforms/dynamic_to_static.cc Outdated Show resolved Hide resolved
python/tvm/relay/op/dyn/transform.py Outdated Show resolved Hide resolved
src/relay/op/dyn/tensor/transform.cc Outdated Show resolved Hide resolved
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

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

@zhiics could you take a look?

Copy link
Member

@zhiics zhiics left a comment

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.

python/tvm/relay/op/_tensor.py Outdated Show resolved Hide resolved
python/tvm/relay/op/_tensor.py Outdated Show resolved Hide resolved
@electriclilies
Copy link
Contributor Author

@zhiics Rebased and nitpicks fixed!

Copy link
Member

@zhiics zhiics left a comment

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
Copy link
Member

zhiics commented Jul 14, 2020

@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
Copy link
Member

zhiics commented Jul 14, 2020

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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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