aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
authorLei Zhang <antiagainst@google.com>2020-01-26 11:10:29 -0500
committerLei Zhang <antiagainst@google.com>2020-01-31 09:37:04 -0500
commitdf71000d7d5df2eb310ba25ddbfd6ab33bef6c56 (patch)
treeea6d501fd0f710d379a064e3173e2e7e4a7f5a41 /llvm/lib/Transforms/Utils/LoopUtils.cpp
parent0bb60e29f18bd45fc26d5f619150f28fc7541e9b (diff)
downloadllvm-df71000d7d5df2eb310ba25ddbfd6ab33bef6c56.zip
llvm-df71000d7d5df2eb310ba25ddbfd6ab33bef6c56.tar.gz
llvm-df71000d7d5df2eb310ba25ddbfd6ab33bef6c56.tar.bz2
[mlir][spirv] Convert linalg.generic for reduction to SPIR-V ops
This commit adds a pattern to lower linalg.generic for reduction to spv.GroupNonUniform* ops. Right now this only supports integer reduction on 1-D input memref. Shader entry point ABI is queried to make sure that the input memref's shape matches the local workgroup's invocation configuration. This makes sure that the workload fits in one local workgroup so that we can leverage SPIR-V group non-uniform operations. linglg.generic is a structured op that preserves the right level of information. It is easier to recognize reduction at this level than performing analysis on loops. This commit also exposes `getElementPtr` in SPIRVLowering.h given that it's a generally useful utility function. Differential Revision: https://reviews.llvm.org/D73437
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
0 files changed, 0 insertions, 0 deletions