[Mlir-commits] [mlir] [MLIR][XeGPU] Add uniform values distribution pattern (PR #176737)
Artem Kroviakov
llvmlistbot at llvm.org
Mon Jan 26 02:26:55 PST 2026
================
@@ -1208,6 +1213,71 @@ struct LoadDistribution final : public gpu::WarpDistributionPattern {
}
};
+// Sink SG-uniform ops. An op is uniform if any of the following is none
+// of its operands/results has a distribution layout attribute.
+// Non-uniform vectors are handled by dedicated patterns.
+// This pattern must have a higher priority than distribution patterns,
----------------
akroviakov wrote:
Vector patterns are oblivious to layouts and will try to apply to qualifying vector ops.
The vector distribution pattern set has no notion of uniform vectors, hence patterns in `VectorDistribute.cpp` try to apply to _any_ vector.
Layouts and the uniformity implied by their absence are an xegpu-local concept that we currently do not expose to the general `VectorDistribute.cpp`. We are doing a one-shot pattern application, so the cleanest way to ensure `VectorDistribute.cpp` is only applied to non-uniform vectors is to process uniform ones beforehand (e.g., using a higher priority pattern).
https://github.com/llvm/llvm-project/pull/176737
More information about the Mlir-commits
mailing list