Skip to content

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.

3 participants