Skip to content

[OpenCL] Implement conv2d_winograd algorithm for Adreno#11543

Merged
masahi merged 8 commits into
apache:mainfrom
echuraev:echuraev/conv2d_winograd_for_adreno
Jun 9, 2022
Merged

[OpenCL] Implement conv2d_winograd algorithm for Adreno#11543
masahi merged 8 commits into
apache:mainfrom
echuraev:echuraev/conv2d_winograd_for_adreno

Conversation

@echuraev

@echuraev echuraev commented Jun 2, 2022

Copy link
Copy Markdown
Contributor

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
Comment thread python/tvm/topi/adreno/conv2d_alter_op.py Outdated
Comment thread python/tvm/topi/adreno/conv2d_nchw_winograd.py Outdated
Comment thread python/tvm/topi/adreno/conv2d_nchw_winograd.py Outdated
Comment thread python/tvm/topi/adreno/conv2d_nchw_winograd.py Outdated
Comment thread python/tvm/topi/adreno/conv2d_nchw_winograd.py
Comment thread python/tvm/topi/adreno/conv2d_nhwc_winograd.py Outdated
Comment thread tests/cpp-runtime/opencl/opencl_texture_pool_test.cc Outdated
Comment thread tests/python/contrib/test_opencl/conftest.py Outdated
Comment thread tests/python/relay/test_conv2d_nchw_texture.py Outdated
Comment thread src/runtime/texture.h Outdated
@echuraev

echuraev commented Jun 7, 2022

Copy link
Copy Markdown
Contributor Author

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

@masahi

masahi commented Jun 7, 2022

Copy link
Copy Markdown
Member

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.

Comment thread python/tvm/topi/adreno/utils.py Outdated
Comment thread src/runtime/texture.h Outdated
Comment thread tests/python/relay/utils/adreno_utils.py Outdated
@echuraev

echuraev commented Jun 8, 2022

Copy link
Copy Markdown
Contributor Author

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