You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tuning nn.dense essentially requires metaschedule RewriteLayout postproc: I found that the memory access pattern of nn.dense, C[i, j] += A[i, k] * B[j, k], where the j axis is vectorized, performs terribly on Hexagon. But the implementation of RewriteLayout is completely incompatible with link-params = True. Until we fix this, we cannot enable RewriteLayout for Hexagon and hence tuning nn.dense (and nn.batch_matmul) is not supported for now.
The reason will be displayed to describe this comment to others. Learn more.
I intentionally left it so that people can experiment with both then and else paths. The else path just compiles and runs the best schedule found in my experiment, which reproduces 440 GOPs performance.
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
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.
Building on #12845, this PR adds an initial support for template-free auto tuning on Hexagon.
Test cases demonstrate:
vrmpyauto tensorization for TE int8dense(weight pre-packed), achieving 440 GOPs on SD888.Known issues:
link-params = True, required by Hexagon, causes identical workloads to be tuned as distinct tasks. So e2d tuning is very slow without the changes from 12706.nn.denseessentially requires metascheduleRewriteLayoutpostproc: I found that the memory access pattern ofnn.dense,C[i, j] += A[i, k] * B[j, k], where thejaxis is vectorized, performs terribly on Hexagon. But the implementation ofRewriteLayoutis completely incompatible withlink-params = True. Until we fix this, we cannot enableRewriteLayoutfor Hexagon and hence tuningnn.dense(andnn.batch_matmul) is not supported for now.cc @kparzysz-quic@junrushao@tmoreau89