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

speed up reference resize kernel #8592

Merged
merged 1 commit into from
Jul 30, 2021

Conversation

mbrookhart
Copy link
Contributor

@jwfromm this refactors the resize reference kernel to use numpy array manipulation. It achieves a ~5-8x speedup on the reference kernel which leads to a ~2x speedup in the numerous places we test resize. for relay/test_op_level5.py:test_resize2d, this takes the test time on my machine from 194 seconds to 93 seconds.

Copy link
Contributor

@jwfromm jwfromm left a comment

Choose a reason for hiding this comment

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

Nice! LGTM.

@tqchen
Copy link
Member

tqchen commented Jul 29, 2021

We could try to use https://github.com/apache/tvm/blob/main/tests/python/topi/python/test_topi_clip.py#L35 memoize to pre-cache computation if the reference is too slow

@mbrookhart
Copy link
Contributor Author

With this change, the reference is no longer the bottleneck, the issue is just running a lot of tests.

@tqchen tqchen merged commit 22c7d61 into apache:main Jul 30, 2021
@tqchen
Copy link
Member

tqchen commented Jul 30, 2021

Thanks @mbrookhart @jwfromm !

@mbrookhart mbrookhart deleted the faster_resize_reference branch July 30, 2021 13:57
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
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