[Mlir-commits] [mlir] [MLIR][XeGPU] Add 2D `vector.multi_reduction` optimization (PR #171154)

Artem Kroviakov llvmlistbot at llvm.org
Wed Jan 7 06:00:24 PST 2026


================
@@ -592,6 +592,25 @@ bool SliceAttr::isSliceOf(const xegpu::DistributeLayoutAttr &other) {
                       [&](int64_t dim) { return thisDims.contains(dim); });
 }
 
+xegpu::SliceAttr SliceAttr::dropSliceDims(ArrayRef<int64_t> dimsToDrop) {
+  auto flattenedThis = flatten();
----------------
akroviakov wrote:

Adjusted. Note that in this case, we can only drop dims in the outer-most slice. After talking to Jianhui, it appears that nested slices are not very common, and we currently do not expect dropping dimensions from the "inner" slices.

This will not be supported (at least for now):
> Drop dim 1 from #slice<#slice<#slice<#layout<...>, dims = [2]>, dims = [1]>, dims = [0]>

https://github.com/llvm/llvm-project/pull/171154


More information about the Mlir-commits mailing list