[all-commits] [llvm/llvm-project] df7100: [mlir][spirv] Convert linalg.generic for reduction...
Lei Zhang via All-commits
all-commits at lists.llvm.org
Fri Jan 31 06:37:11 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: df71000d7d5df2eb310ba25ddbfd6ab33bef6c56
https://github.com/llvm/llvm-project/commit/df71000d7d5df2eb310ba25ddbfd6ab33bef6c56
Author: Lei Zhang <antiagainst at google.com>
Date: 2020-01-31 (Fri, 31 Jan 2020)
Changed paths:
A mlir/include/mlir/Conversion/LinalgToSPIRV/LinalgToSPIRV.h
A mlir/include/mlir/Conversion/LinalgToSPIRV/LinalgToSPIRVPass.h
M mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
M mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
M mlir/include/mlir/Dialect/SPIRV/SPIRVAtomicOps.td
M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
M mlir/include/mlir/Dialect/SPIRV/TargetAndABI.h
M mlir/lib/Conversion/CMakeLists.txt
A mlir/lib/Conversion/LinalgToSPIRV/CMakeLists.txt
A mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp
A mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRVPass.cpp
M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
M mlir/lib/Dialect/Linalg/Utils/Utils.cpp
M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
M mlir/lib/Dialect/SPIRV/TargetAndABI.cpp
A mlir/test/Conversion/LinalgToSPIRV/linalg-to-spirv.mlir
M mlir/tools/mlir-opt/CMakeLists.txt
Log Message:
-----------
[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
More information about the All-commits
mailing list