[mlir][spirv] Lower max/min vector.reduction for OpenCL
authorStanley Winata <stanley@nod-labs.com>
Tue, 20 Sep 2022 21:16:52 +0000 (17:16 -0400)
committerLei Zhang <antiagainst@google.com>
Tue, 20 Sep 2022 21:22:41 +0000 (17:22 -0400)
commitf5253058144aca1e9fcacdca53accdc975e804cf
treec385e4ca0327f796deee4682745d45bba25981b8
parent5bb7ac0c55c6f22340300af1b107b8a95006856d
[mlir][spirv] Lower max/min vector.reduction for OpenCL

Templatizing vector reduction to enable lowering from
vector.reduction max/min to CL ops.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D134313
mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp
mlir/test/Conversion/VectorToSPIRV/vector-to-spirv.mlir