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 UpSampling3D Op #6353

Merged
merged 11 commits into from
Sep 4, 2020

Conversation

electriclilies
Copy link
Contributor

@electriclilies electriclilies commented Aug 28, 2020

This PR implements the dynamic version of the UpSampling3D relay op. After this is merged, we will be able to remove the final infer_value calls from the onnx importer, allowing us to import truly dynamic onnx graphs into relay. I also cleaned up some documentation and tests for upsampling and resize

It is very similar to the dynamic UpSampling op (see #6273).

@mbrookhart @zhiics @icemelon9 please take a look

@tqchen
Copy link
Member

tqchen commented Sep 2, 2020

@mbrookhart @zhiics can you please follow up

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, one change I don't quite understand.

Can you rebase?

python/tvm/relay/op/dyn/nn/_nn.py Show resolved Hide resolved
func = relay.Function([x, scale_d_var, scale_h_var, scale_w_var], z)

for target, ctx in ctx_list():
##TODO(mbrookhart)(electriclilies): remove when VM supports heterogeneous execution
Copy link
Member

Choose a reason for hiding this comment

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

we can try gpu tests now

verify_upsampling((1, 16, 32, 32), 2.0, 2.0,"NCHW", "nearest_neighbor")
verify_upsampling((1, 16, 32, 32), 2.0, 2.0, "NCHW", "bilinear", True)
verify_upsampling((1, 16, 32, 32), 2.0, 2.0, "NHWC", "nearest_neighbor")
##TODO(mbrookhart)(electriclilies): remove when VM supports heterogeneous execution
Copy link
Member

Choose a reason for hiding this comment

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

ctx_list has been removed. Use enabled_targets and we can enable GPU tests now

@zhiics zhiics merged commit 86fa81c into apache:master Sep 4, 2020
@zhiics
Copy link
Member

zhiics commented Sep 4, 2020

Thanks @electriclilies @mbrookhart

kevinthesun pushed a commit to kevinthesun/tvm that referenced this pull request Sep 17, 2020
* frontend and start of cpp impl

* upsampling3d typerel and makefunc

* impl upsampling3d dynamic to static pass

* passes test_dyn_upsampling3d_infer_type_const

* fix bugs and improve doc for resize and upsampling

* code cleanup

* make tests more complex

* code cleanup, fix test_dyn_upsampling3d_run

* fix typo

* ci not working
kevinthesun pushed a commit to kevinthesun/tvm that referenced this pull request Sep 18, 2020
* frontend and start of cpp impl

* upsampling3d typerel and makefunc

* impl upsampling3d dynamic to static pass

* passes test_dyn_upsampling3d_infer_type_const

* fix bugs and improve doc for resize and upsampling

* code cleanup

* make tests more complex

* code cleanup, fix test_dyn_upsampling3d_run

* fix typo

* ci not working
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Sep 18, 2020
* frontend and start of cpp impl

* upsampling3d typerel and makefunc

* impl upsampling3d dynamic to static pass

* passes test_dyn_upsampling3d_infer_type_const

* fix bugs and improve doc for resize and upsampling

* code cleanup

* make tests more complex

* code cleanup, fix test_dyn_upsampling3d_run

* fix typo

* ci not working
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants