aboutsummaryrefslogtreecommitdiff
path: root/libclc
diff options
context:
space:
mode:
authorAhmed Taei <ataei@google.com>2021-04-29 14:05:23 -0700
committerAhmed Taei <ataei@google.com>2021-04-30 10:52:21 -0700
commit499e89fc9119d901132bcc8ab460b1c161c22acc (patch)
treec90bb645eb7cefacdeef396501d3b59f824ce6dd /libclc
parent6e6ae6c727b795eaca5495f64c064ee917bb26e5 (diff)
downloadllvm-499e89fc9119d901132bcc8ab460b1c161c22acc.zip
llvm-499e89fc9119d901132bcc8ab460b1c161c22acc.tar.gz
llvm-499e89fc9119d901132bcc8ab460b1c161c22acc.tar.bz2
Add patterns to lower vector.multi_reduction into a sequence of vector.reduction
Three patterns are added to convert into vector.multi_reduction into a sequence of vector.reduction as the following: - Transpose the inputs so inner most dimensions are always reduction. - Reduce rank of vector.multi_reduction into 2d with inner most reduction dim (get the 2d canical form) - 2D canonical form is converted into a sequence of vector.reduction. There are two things we might worth in a follow up diff: - An scf.for (maybe optionally) around vector.reduction instead of unrolling it. - Breakdown the vector.reduction into a sequence of vector.reduction (e.g tree-based reduction) instead of relying on how downstream dialects handle it. Note: this will requires passing target-vector-length Differential Revision: https://reviews.llvm.org/D101570
Diffstat (limited to 'libclc')
0 files changed, 0 insertions, 0 deletions