[Mlir-commits] [mlir] [mlir][xegpu] SIMT distribution patterns for XeGPU CreateNdTdesc, LoadNd, StoreNd and Dpas Ops. (PR #135271)
Frank Schlimbach
llvmlistbot at llvm.org
Tue Apr 29 01:46:43 PDT 2025
================
@@ -329,95 +368,97 @@ SGMapPropagation::visitOperation(Operation *op,
})
/// All other ops.
.Default([&](Operation *op) {
- for (const SGMapLattice *r : results) {
- for (SGMapLattice *operand : operands) {
+ for (const LayoutInfoLattice *r : results) {
+ for (LayoutInfoLattice *operand : operands) {
/// Propagate the layout of the result to the operand.
if (r->getValue().isAssigned())
meet(operand, *r);
}
}
});
/// Add a dependency from each result to program point after the operation.
- for (const SGMapLattice *r : results) {
- addDependency(const_cast<SGMapLattice *>(r), getProgramPointAfter(op));
+ for (const LayoutInfoLattice *r : results) {
+ addDependency(const_cast<LayoutInfoLattice *>(r), getProgramPointAfter(op));
}
return success();
}
-void SGMapPropagation::visitVectorMultiReductionOp(
- vector::MultiDimReductionOp reduction, ArrayRef<SGMapLattice *> operands,
- ArrayRef<const SGMapLattice *> results) {
+void LayoutInfoPropagation::visitVectorMultiReductionOp(
+ vector::MultiDimReductionOp reduction,
+ ArrayRef<LayoutInfoLattice *> operands,
+ ArrayRef<const LayoutInfoLattice *> results) {
/// The layout of the result must be present.
- auto resultLayout = results[0]->getValue();
+ LayoutInfo resultLayout = results[0]->getValue();
if (!resultLayout.isAssigned())
return;
/// We only consider 2D -> 1D reductions at this point.
assert(resultLayout.getLayout().size() == 1 &&
"Expected 1D layout for reduction result.");
/// Given that the result is 1D, the layout of the operand should be 2D with
/// default layout.
- auto operandLayout = getDefaultSgMap(2);
+ LayoutInfo operandLayout = getDefaultLayoutInfo(2);
propagateIfChanged(operands[0], operands[0]->meet(operandLayout));
/// Accumulator should have the same layout as the result.
propagateIfChanged(operands[1], operands[1]->meet(resultLayout));
----------------
fschlimb wrote:
Similarly, can operands.size() be < 2?
https://github.com/llvm/llvm-project/pull/135271
More information about the Mlir-commits
mailing list