-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add support for generating LLVM vector predication intrinsics. #7111
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
useful for RISC V, but it may be a simpler, better optimized path, for Halide vector operations in general. Add support for a maximum vector size that might be larger than the native vector size. RISC V vector LMUL support is an example of an architecture supporting this.
promotion contexts.
vector predication intrinsics.
improving the calling convention and naming of the new routines to generate the intrinsics.
steven-johnson
approved these changes
Oct 21, 2022
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.
LGTM with various style comments.
abadams
reviewed
Oct 22, 2022
caveperson programmer habits die hard. Improve comments.
concatenation into one line.
Change TODO(zalman) to TODO(zvookin) uniformly. Few other cleanups.
strided load for dense case. Add some comments.
ardier
pushed a commit
to ardier/Halide-mutation
that referenced
this pull request
Mar 3, 2024
…e#7111) Add support for generating llvm.vp.* intrinsics. This is particularly useful for RISC V, but it may be a simpler, better optimized path, for Halide vector operations in general. Add support for a maximum vector size that might be larger than the native vector size. RISC V vector LMUL support is an example of an architecture supporting this.
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.
LLVM now has intrinsics for length bounded, predicated, vector operations. These are a generalization of the current vector IR LLVM has long had and will likely become the preferred way to generate pretty much all vector code in the future. (With appropriately restricted arguments to target existing fixed width SIMD instruction sets.)
Code has been tested in the riscv_update branch and will be used by the RISC V backend. PR has been separated out to make for a smaller, easier to review PR.
This required adding some helper methods to CodeGen_LLVM as the intrinsics have specific type mangling and argument pattterns that can be handled in common code.