<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/72354>72354</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [mlir][gpu] Reduce operations diverged from vector combining kinds
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir:gpu
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            kuhar
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          kuhar
      </td>
    </tr>
</table>

<pre>
    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?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxslM2OpDgMx58mXKxBqfDRVQcOzNSincustNr7KhAXeDskKB9M99uvEmh1t2akFu4K9t_2zybSe5oNYsear0yI57hIx4Rgzb2QMSzWdfmoGK167f5ZEOYtgiKpcQqwObuTQg8STFxHdGAfIHdJWo4awaGKUyBr4JmM8sDElbV83iKrelb1vdZ_Jw_8a0Mnkx9rORO3DwpkwG6eiW9wBJZS63-zLLKWgzTq7YWP4-xs3N7flvAtOocm6NckEBb0v5YkHbKqB6lU8pEmm1W-ZEMmm6iTsS49X6wrGb8z3h_PRIS1PLm-15PiW_6eK6cBuY40Rxs9PKwDMgFndIkJlnOZtPMgVEoLTFxYdYdoPJn5OMtgjIKHtjJAeN0wA_0hf8AijdJkZiZuJXyHsJB5Pvv1i41awYgg9SH_k8ICO07Bul9ohEUGcOit3vEUOKqmQOjT1I7Wqz8OYkNmMzDRM9GvZDylMzIxW_niT5t-9_lvyIiHBHN4se4jijTmD_pG_T7H45B8HJlojet5cv6b3LJsBuU_TWvESUafW_u0x8qiB2MDKNzQKLAmu5yUTq9ziWC1Pm2-nAJNUsO0WJoQfr5xDhYmu72C3dEd_ml2qcAT8sPZ9Tfynwr9U-4I32El71GBtyumoc6sGgrVVepW3WSB3eWJc17xtuXF0rXVQ1yrW3O93sbrUzPVVV3LW3NVl7HGh-QFdYKL6nK5NLyt68utHPlVPdVNkhBilILVHFdJutR6X0vr5oK8j9g9iaqpCy1H1P68JlZNjlV9-pSPu8J1KejLGGfPaq7JB_8uEyjofMHksObOmq8psrnD8f2DfbsAPCja0aWVz5hORJNdRzJk5gNhEZ3ulhC2vJJpN4aZwhLHcrIrE0NKfJovm7P_5eENuRnPxJD7-T8AAP__2pugrg">