llvm-project/mlir/lib/Dialect/SPIRV
Lei Zhang df71000d7d [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
2020-01-31 09:37:04 -05:00
..
Serialization [mlir][NFC] Update Operation::getResultTypes to use ArrayRef<Type> instead of iterator_range. 2020-01-27 19:57:48 -08:00
Transforms [mlir][spirv] NFC: simplify load/store builder call sites 2020-01-26 10:45:42 -05:00
CMakeLists.txt [mlir][spirv] Fix ADDITIONAL_HEADER_DIRS for SPIR-V libraries 2020-01-03 15:06:09 -05:00
DialectRegistration.cpp Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
LayoutUtils.cpp Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
SPIRVCanonicalization.td Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
SPIRVDialect.cpp [mlir][spirv] Properly support SPIR-V conversion target 2020-01-14 19:18:42 -05:00
SPIRVLowering.cpp [mlir][spirv] Convert linalg.generic for reduction to SPIR-V ops 2020-01-31 09:37:04 -05:00
SPIRVOps.cpp [mlir][spirv] Convert linalg.generic for reduction to SPIR-V ops 2020-01-31 09:37:04 -05:00
SPIRVTypes.cpp Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
TargetAndABI.cpp [mlir][spirv] Convert linalg.generic for reduction to SPIR-V ops 2020-01-31 09:37:04 -05:00