[Hexagon] Adapt some intrinsics for high vector lanes#14345
Merged
masahi merged 4 commits intoapache:mainfrom Mar 27, 2023
Merged
[Hexagon] Adapt some intrinsics for high vector lanes#14345masahi merged 4 commits intoapache:mainfrom
masahi merged 4 commits intoapache:mainfrom
Conversation
Collaborator
|
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 |
Contributor
Author
|
@ibsidorenko FYI |
Signed-off-by: Alexander Peskov <peskovnn@gmail.com>
Signed-off-by: Alexander Peskov <peskovnn@gmail.com>
Contributor
Author
|
@masahi @kparzysz-quic @jverma-quic Previously you reviewed patches like this. Could you please take a look on this one? |
ibsidorenko
approved these changes
Mar 21, 2023
masahi
reviewed
Mar 21, 2023
Member
masahi
left a comment
There was a problem hiding this comment.
Please polish doc writing in general.
| Will accept vector lanes equal orig_vec_lanes * 2**n for n in [0,1,2...] | ||
|
|
||
| Ada is equivalent of splitting input args to chunk with lanes equal orig_vec_lanes, | ||
| execution provided low_intrinsic for each of them and concatenate back. |
Member
There was a problem hiding this comment.
Also please polish this sentence, it is broken.
| Intrinsic implementation to adapt | ||
|
|
||
| intrinsic_lanes: int | ||
| Args lanes supported by provided intrinsic |
masahi
approved these changes
Mar 24, 2023
Member
|
@tvm-bot rerun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal is to allow to apply intrinsics "q_multiply_shift" and "q_multiply_shift_per_axis" for vector type i32x128. Originally it supports only "i32x32" which is natively supported by platform (1024 bit vector).
Motivation
There are situation than we have to use vector size slightly more than supported by platform. As example consider sequence of element-wise operators: add -> q_multiply_shift -> cast. To achieve performance we have to squash it into one single loop (
sch.compute_at(...)). First two operators would like to be vectorised with using data type "int32x32". last one cast operator want to use i32x128 as src and i8x128 as dst. As result we have to adapt all this operator to accept vector size "??x128" to successfully vectorise entire loop.This change allows to achieve significant performance speedup for tuning tasks like
conv -> add -> qnn.requantize -> cast_i8.