[Mlir-commits] [mlir] [mlir][xegpu] Add support for `vector.multi_reduction` and `vector.shape_cast` SIMT distribution. (PR #157560)
Charitha Saumya
llvmlistbot at llvm.org
Tue Sep 9 11:12:23 PDT 2025
================
@@ -58,6 +58,33 @@ namespace {
// SIMT Distribution Patterns
//===----------------------------------------------------------------------===//
+/// In certain cases, we may need to favor XeGPU specific distribution patterns
+/// over generic vector distribution patterns. In such cases, we can assign
+/// priorities to patterns.
+static constexpr unsigned regularPatternBenefit = 1;
+static constexpr unsigned highPatternBenefit = 2;
+
+/// Helper function to compute the effective lane layout from a
+/// DistributeLayoutAttr which can be either a LayoutAttr or a SliceAttr.
+static SmallVector<int64_t>
+computeEffectiveLaneLayout(const xegpu::DistributeLayoutAttr layout) {
----------------
charithaintc wrote:
moved to XeGPUUtils. it only considers the lane layouts. maybe can be extended in future to sg Layouts.
https://github.com/llvm/llvm-project/pull/157560
More information about the Mlir-commits
mailing list