[TOPI] Ensure vectorization of input padding in arm_cpu int8 conv2d interleaved schedule
#15710
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.
When padding the input data, the int8 conv2d interleaved schedule tries to split the
data_im2colcols axis by a factor of 16 in order to then vectorize over those splits. However, the size of the axis isn_size = KH x KW x ICand theLegalizepass only pads the number of input channels up to a multiple of 8. Therefore,n_sizeis only guaranteed to be a multiple of 8, not 16.I modified the schedule to check whether a split factor of 16 is appropriate, otherwise use 8 instead, in order to ensure vectorization is performed in all cases.
cc @ekalda @lhutton1 @leandron @neildhickey