Skip to content

[mlir][gpu] Reduce operations diverged from vector combining kinds #72354

Closed
@kuhar

Description

@kuhar

The gpu dialect provides a number of available reduction kinds (gpu::AllReduceOperation) available in ops, gpu.all_reduce and gpu.subgroup_reduce. Currently, these reduction kinds are: add, and, max, min, mul, or, xor.

The min and max reductions are ambiguous for integer (e.g., signed min != unsinged min) and float types (NaN handling). I think these should be aligned with vector reduction kinds that resolve these ambiguities:

add/mul/minsi/minui/maxsi/maxui/and/or/xor for integers,
and add/mul/minf/maxf/minimumf/maximumf for floats.

Because the gpu dialect does not depend on the vector dialect, the most practical choice would be to copy over the min/max kinds from the vector dialect.

Have I missed something?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions