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

[OpenCL] Implement conv2d_winograd algorithm for Adreno #11543

Merged
merged 8 commits into from
Jun 9, 2022

Conversation

echuraev
Copy link
Contributor

@echuraev echuraev commented Jun 2, 2022

This PR includes the following changes:

  • Implemented conv2d_nchw and conv2d_nhwc winograd algorithm for Adreno devices
  • Added google test on the texture pool
  • Fixed several issues in texture pool
  • Added accuracy test on the winograd algorithm

cc: @elvin-n, @TejashShah, @csullivan

@echuraev echuraev force-pushed the echuraev/conv2d_winograd_for_adreno branch 4 times, most recently from 7bdae6d to ab6679c Compare June 3, 2022 08:21
@echuraev echuraev force-pushed the echuraev/conv2d_winograd_for_adreno branch from ab6679c to c6048ff Compare June 3, 2022 08:34
python/tvm/topi/adreno/conv2d_alter_op.py Outdated Show resolved Hide resolved
python/tvm/topi/adreno/conv2d_nchw_winograd.py Outdated Show resolved Hide resolved
python/tvm/topi/adreno/conv2d_nchw_winograd.py Outdated Show resolved Hide resolved
python/tvm/topi/adreno/conv2d_nchw_winograd.py Outdated Show resolved Hide resolved
python/tvm/topi/adreno/conv2d_nhwc_winograd.py Outdated Show resolved Hide resolved
tests/cpp-runtime/opencl/opencl_texture_pool_test.cc Outdated Show resolved Hide resolved
tests/python/contrib/test_opencl/conftest.py Outdated Show resolved Hide resolved
tests/python/relay/test_conv2d_nchw_texture.py Outdated Show resolved Hide resolved
src/runtime/texture.h Outdated Show resolved Hide resolved
@echuraev
Copy link
Contributor Author

echuraev commented Jun 7, 2022

@masahi, @csullivan could you please review this PR?

@masahi
Copy link
Member

masahi commented Jun 7, 2022

Can we share some code on bgemm schedule / tuning space definition between nchw / nhwc? I think we can reduce 500 lines added for nchw and nhwc each.

src/runtime/texture.h Outdated Show resolved Hide resolved
tests/python/relay/utils/adreno_utils.py Outdated Show resolved Hide resolved
@echuraev
Copy link
Contributor Author

echuraev commented Jun 8, 2022

Can we share some code on bgemm schedule / tuning space definition between nchw / nhwc? I think we can reduce 500 lines added for nchw and nhwc each.

@masahi Thank you for your comment. I refactored the code and moved the common part to a separate file.

@echuraev echuraev force-pushed the echuraev/conv2d_winograd_for_adreno branch 2 times, most recently from 3d468cf to 9f19d71 Compare June 8, 2022 10:41
@echuraev echuraev force-pushed the echuraev/conv2d_winograd_for_adreno branch from 9f19d71 to b92d317 Compare June 8, 2022 11:05
@masahi masahi merged commit 2f9d9b4 into apache:main Jun 9, 2022
@echuraev echuraev deleted the echuraev/conv2d_winograd_for_adreno branch June 9, 2022 05:16
Kathryn-cat pushed a commit to Kathryn-cat/tvm that referenced this pull request Jun 10, 2022
* Implement conv2d_winograd algorithm for Adreno

* Implement gtest for OpenCL texture pool

* Implement conv2d_nhwc_winograd for Adreno

* Minor refactoring

* Fix lint

* Apply comments

* Apply comments

* Fix lint
@echuraev echuraev restored the echuraev/conv2d_winograd_for_adreno branch June 10, 2022 14:37
echuraev added a commit to echuraev/tvm that referenced this pull request Jun 20, 2022
* Implement conv2d_winograd algorithm for Adreno

* Implement gtest for OpenCL texture pool

* Implement conv2d_nhwc_winograd for Adreno

* Minor refactoring

* Fix lint

* Apply comments

* Apply comments

* Fix lint
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