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

[Adreno] Add documentation for Adreno deployment #13393

Merged
merged 19 commits into from
Nov 28, 2022

Conversation

dsbarinov1
Copy link
Contributor

@dsbarinov1 dsbarinov1 commented Nov 15, 2022

Purpose:
assist TVM users compile and deploy on Adreno by expanding our documentation and providing sample scripts in TVM.

Information about PR:
The present PR consists globally of 3 parts.

The first part is an introductory article on compilation and deployment of neural networks on Adreno, covering such topics as: «Build TVM for Android/Adreno», «Advantages of textures» and «Differences in compilation and deployment of models for Adreno devices».

The second part is a straightforward example script for compiling and inferring models at different precisions for Adreno devices.

The third part is auxiliary files, images, etc.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Nov 15, 2022

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

@dsbarinov1 dsbarinov1 force-pushed the dbarinov/adreno_docs_release branch from 9bf1929 to bb8696d Compare November 15, 2022 13:37
@echuraev
Copy link
Contributor

@masahi, @driazati, @areusch Could you please help? This PR contains two image files. We saw that other images are stored here. How this PR should be merged? First the images should be added to the tlc-pack/web-data repository and only after that this PR might be merged to the tvm/main?

Copy link
Member

@driazati driazati left a comment

Choose a reason for hiding this comment

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

For the images we prefer to keep binary files outside of the repo for readability / size reasons, can you instead make a PR to add them to https://github.com/tlc-pack/web-data and tag me in it? Once that's done you can link to them in rst e.g.

just saw your comment @echuraev, we can merge the PR to tlc-pack/web-data first then use that on this PR to make sure it's all good, then merge this one


For the complete step-py-step process of compiling and deploying models on
Adreno, including selection of precision, running the inference of the
model, getting the predictions, and measuring the performance please refer to this tutorial: `How To Deploy model on Adreno <https://tvm.apache.org/docs/how_to/deploy_models/deploy_model_on_adreno.html>`_
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably the link can be relative

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could not find references for creating relative links in other apache documents.
@driazati what do you think about that? Should we somehow make relative links to the other docs?

* Operations which can be converted if they follow by converted cluster
* Operations never be converted to the float16 data type
This list is defined in the ToMixedPrecision implementation here
`relay/transform/mixed_precision.py <https://github.com/apache/tvm/blob/main/python/tvm/relay/transform/mixed_precision.py#L34>`_
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably it would be better to have relative links. Not sure if it will work with specifying line number. But anyway, line number might be not actual after adding something to this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Couldn't make a relative link to other site.

dsbarinov1 added a commit to dsbarinov1/web-data that referenced this pull request Nov 18, 2022
driazati pushed a commit to tlc-pack/web-data that referenced this pull request Nov 18, 2022
@driazati
Copy link
Member

hey @dsbarinov1 just a note on the CI failures, you'll probably need to rebase your changes on the latest main in order to get CI running properly

@dsbarinov1 dsbarinov1 force-pushed the dbarinov/adreno_docs_release branch from 23a78ab to 28b1562 Compare November 22, 2022 11:41
Purpose:
assist TVM users compile and deploy on Adreno by expanding our documentation and providing sample scripts in TVM.

Information about PR:
The present PR consists globally of 3 parts.

The first part is an introductory article on compilation and deployment of neural networks on Adreno, covering such topics as: «Build TVM for Android/Adreno», «Advantages of textures» and «Differences in compilation and deployment of models for Adreno devices».

The second part is a straightforward example script for compiling and inferring models at different precisions for Adreno devices.

The third part is auxiliary files, images, etc.
@dsbarinov1 dsbarinov1 force-pushed the dbarinov/adreno_docs_release branch from 962b89a to 81a60ce Compare November 24, 2022 23:06
Comment on lines 81 to 82
Alternatively, to build a TVM via docker using OpenCL-Headers and set-up
with Android TVM RPC, refer to this guide: `Deploy the Pretrained Model on Android <https://tvm.apache.org/docs/how_to/deploy_models/deploy_model_on_android.html>`_.
Copy link
Contributor

Choose a reason for hiding this comment

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

Phrase about OpenCL-Headers is not actual now. OpenCL Headers are not necessary for building TVM now and this documentation also was updated in this commit: 2bb3382

Suggested change
Alternatively, to build a TVM via docker using OpenCL-Headers and set-up
with Android TVM RPC, refer to this guide: `Deploy the Pretrained Model on Android <https://tvm.apache.org/docs/how_to/deploy_models/deploy_model_on_android.html>`_.
Since there are many required packages for Android, you can use the official Docker Image to build TVM. For more information refer to this guide: `Deploy the Pretrained Model on Android <https://tvm.apache.org/docs/how_to/deploy_models/deploy_model_on_android.html>`_.

@supersat
Copy link
Contributor

Seems like PR #13073 broke these instructions, and now additionally requires specifying -DUSE_MICRO=OFF to cmake

Copy link
Contributor

@echuraev echuraev left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

@dsbarinov1 dsbarinov1 force-pushed the dbarinov/adreno_docs_release branch from 6836a6f to 98ee8b5 Compare November 25, 2022 17:46
@masahi
Copy link
Member

masahi commented Nov 28, 2022

@echuraev You should be able to merge now.

@echuraev echuraev merged commit c38a0c5 into apache:main Nov 28, 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.

6 participants