-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[SVE] Support splitting by vscale in tir::split
and te::split
#16862
Merged
Conversation
This file contains 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
This commit adds support for splitting via the compile-time unknown constant `vscale`. Two main changes are introduced; they are described below. The split scheduling primitive has a new parameter disable_predication that allows the user to avoid introducing a block-level predicate when splitting with a factor of `vscale`. This feature is useful when schedule writers know that the loop they're splitting is a factor of the scalable vector length for their target. Otherwise, a predicate must be introduced due to the nature of `vscale`. CanProve has been extended to prove expressions that use multiple instances of `vscale`. Known possible scalar values of the `vscale` intrinsic are iterated over and substituted into the expression. If the expression holds true for each possible value, we can conclude the expression true. Currently only support for an SVE target has been added, but it is possible to extend to other targets as/when needed. If the analyzer becomes more powerful in the future and is able to deal with multiple instances of a symbolic value in an expression, this feature can be removed. Co-authored-by: Elen Kalda <elen.kalda@arm.com> Co-authored-by: Neil Hickey <neil.hickey@arm.com> Change-Id: I734e14190967c5e35002759f037b38eb0755380e
Change-Id: I7f7ac4103126470ef3389d19192faa27e9831201
Change-Id: Ic61769228f4c9aaafbd2c57440e0745ef630053b
ekalda
reviewed
Apr 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lhutton1, looks good to me! Just some low impact suggestions.
12 tasks
Change-Id: I506bb622065e516b4e7111d461e3dac6ee821889
lhutton1
force-pushed
the
p5-sve-split-support
branch
from
April 12, 2024 13:23
7f7f844
to
d200c79
Compare
ekalda
approved these changes
Apr 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lhutton1, very nice work!
Thanks @lhutton1 :) |
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.
This commit adds support for splitting via the compile-time unknown constant
vscale
. Two main changes are introduced; they are described below.The split scheduling primitive has a new parameter disable_predication that allows the user to avoid introducing a block-level predicate when splitting with a factor of
vscale
. This feature is useful when schedule writers know that the loop they're splitting is a factor of the scalable vector length for their target. Otherwise, a predicate must be introduced due to the nature ofvscale
.CanProve has been extended to prove expressions that use multiple instances of
vscale
. Known possible scalar values of thevscale
intrinsic are iterated over and substituted into the expression. If the expression holds true for each possible value, we can conclude the expression true. Currently only support for an SVE target has been added, but it is possible to extend to other targets as/when needed. If the analyzer becomes more powerful in the future and is able to deal with multiple instances of a symbolic value in an expression, this feature can be removed.Co-authored-by: Elen Kalda elen.kalda@arm.com
Co-authored-by: Neil Hickey neil.hickey@arm.com