[all-commits] [llvm/llvm-project] e0aac8: [mlir][gpu] Align reduction operations with vector...
Jakub Kuderski via All-commits
all-commits at lists.llvm.org
Mon Nov 27 08:19:35 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e0aac8c88d0d30e8da0f8a240ad1e6b4d88782e0
https://github.com/llvm/llvm-project/commit/e0aac8c88d0d30e8da0f8a240ad1e6b4d88782e0
Author: Jakub Kuderski <jakub at nod-labs.com>
Date: 2023-11-27 (Mon, 27 Nov 2023)
Changed paths:
M mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
M mlir/include/mlir/IR/CommonTypeConstraints.td
M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
M mlir/lib/Dialect/GPU/Transforms/AllReduceLowering.cpp
M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
M mlir/test/Conversion/GPUToSPIRV/reductions.mlir
A mlir/test/Dialect/GPU/all-reduce-add.mlir
R mlir/test/Dialect/GPU/all-reduce-max.mlir
A mlir/test/Dialect/GPU/all-reduce-maxf.mlir
R mlir/test/Dialect/GPU/all-reduce.mlir
M mlir/test/Dialect/GPU/invalid.mlir
Log Message:
-----------
[mlir][gpu] Align reduction operations with vector combining kinds (#73423)
The motivation for this change is explained in
https://github.com/llvm/llvm-project/issues/72354.
Before this change, we could not tell between signed/unsigned
minimum/maximum and NaN treatment for floating point values.
The mapping of old reduction operations to the new ones is as follows:
* `min` --> `minsi` for ints, `minf` for floats
* `max` --> `maxsi` for ints, `maxf` for floats
New reduction kinds not represented in the old enum: `minui`, `maxui`,
`minimumf`, `maximumf`.
As a next step, I would like to have a common definition of combining
kinds used by the `vector` and `gpu` dialects. Separately, the GPU to
SPIR-V lowering does not yet properly handle zero and NaN values -- the
behavior of floating point min/max group reductions is not specified by
the SPIR-V spec, see https://github.com/llvm/llvm-project/issues/73459.
Issue: https://github.com/llvm/llvm-project/issues/72354
More information about the All-commits
mailing list