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

[Test] enable NHWC of relay.testing.mobilenet #3886

Merged
merged 2 commits into from
Sep 5, 2019
Merged

[Test] enable NHWC of relay.testing.mobilenet #3886

merged 2 commits into from
Sep 5, 2019

Conversation

zhenhuaw-me
Copy link
Contributor

@zhenhuaw-me zhenhuaw-me commented Sep 3, 2019

This is part of #3859 which enables NHWC for conv2d on ARM devices. Putting it here will be clearer. Please help to review @tqchen @eqy .

EDIT: the force-push fixed lint.

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

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

LGTM

@tmoreau89
Copy link
Contributor

Should we also consider adding a unit test that would check that relay.testing.mobilenet.get_workload works with both layout=NHWC and layout=NCHW?

@zhenhuaw-me
Copy link
Contributor Author

Hi @tmoreau89 , thank you for the quick review!

Should we also consider adding a unit test that would check that relay.testing.mobilenet.get_workload works with both layout=NHWC and layout=NCHW?

Yes, adding a test is good point, I have also evaluated before open this PR. To me, testing relay.testing is sort like a system integrated test which needs to verify end to end running result, leading to tests/python/relay/benchmarking. Sadly, the building (tvm) and running (vm) with mobilenet NHWC layout is too slow (several minutes) for some reason (maybe because we are initializing NHWC support in TOPI). I think that is not acceptable as NCHW can finish in several seconds. So, I didn't include that part in this PR. And, running get_workload without building and running seems test too little... What's your thoughts/suggestions?

@tmoreau89
Copy link
Contributor

Good points @jackwish ! It's weird that compiling NHWC is too slow indeed; perhaps it's worth looking into it. Can we at least have a test for NCHW and add NHWC as a TODO with a linked issue? I'm happy to look into why perf is so slow.

@zhenhuaw-me
Copy link
Contributor Author

zhenhuaw-me commented Sep 4, 2019

Good points @jackwish ! It's weird that compiling NHWC is too slow indeed; perhaps it's worth looking into it. Can we at least have a test for NCHW and add NHWC as a TODO with a linked issue? I'm happy to look into why perf is so slow.

Marking it is a good idea rather than leaving it there :) I will update the PR. I think the building performance is related with the OP schedules - there is not dedicated NHWC schedules for x86 target (it is pretty fast when we build targeting arm internally). I guess this issue can be fixed when your NHWC schedule (#3858) got merged. :)

In this way, we can play around NHWC inside TVM regardless of
the frontends.
@tmoreau89
Copy link
Contributor

Exactly! I think that if this PR gets merged first, I can just enable the test once performance is reasonable.

@zhenhuaw-me
Copy link
Contributor Author

zhenhuaw-me commented Sep 5, 2019

Exactly! I think that if this PR gets merged first, I can just enable the test once performance is reasonable.

Thank you @tmoreau89

@vinx13 @zhiics @icemelon9 , would you please also take a look at this if it can merge now?

Seems the CI was canceled, can we trigger it by hand?

@tmoreau89
Copy link
Contributor

Looks great, thanks for adding the test. Regarding the CI error I haven't encountered this bug before... Did re-triggering with a minimal commit work around it?

@zhiics
Copy link
Member

zhiics commented Sep 5, 2019

As for CI I cannot log in to retrigger as well, we can probably just submit an empty commit to run it again.

git commit --allow-empty -m "retrigger ci"

@zhiics
Copy link
Member

zhiics commented Sep 5, 2019

NVM, please just ignore my comment. I just saw you updated.

@zhenhuaw-me
Copy link
Contributor Author

NVM, please just ignore my comment. I just saw you updated.

Yes, thank you @zhiics

@tmoreau89 tmoreau89 merged commit e873a73 into apache:master Sep 5, 2019
MarisaKirisame pushed a commit to MarisaKirisame/tvm that referenced this pull request Sep 7, 2019
* [Relay] enable NHWC of `relay.testing.mobilenet`

In this way, we can play around NHWC inside TVM regardless of
the frontends.

* [Test] test for NHWC of relay.testing.mobilenet
wweic pushed a commit to wweic/tvm that referenced this pull request Sep 16, 2019
* [Relay] enable NHWC of `relay.testing.mobilenet`

In this way, we can play around NHWC inside TVM regardless of
the frontends.

* [Test] test for NHWC of relay.testing.mobilenet
wweic pushed a commit to wweic/tvm that referenced this pull request Sep 16, 2019
* [Relay] enable NHWC of `relay.testing.mobilenet`

In this way, we can play around NHWC inside TVM regardless of
the frontends.

* [Test] test for NHWC of relay.testing.mobilenet
wweic pushed a commit to neo-ai/tvm that referenced this pull request Sep 16, 2019
* [Relay] enable NHWC of `relay.testing.mobilenet`

In this way, we can play around NHWC inside TVM regardless of
the frontends.

* [Test] test for NHWC of relay.testing.mobilenet
@zhenhuaw-me zhenhuaw-me deleted the test/relay branch September 19, 2019 05:50
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.

None yet

3 participants