File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
mlir/lib/Dialect/XeGPU/Transforms Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1505,16 +1505,16 @@ void XeGPUSubgroupDistributePass::runOnOperation() {
15051505 return AffineMap::get (val.getContext ());
15061506 // Get the layout of the vector type.
15071507 xegpu::DistributeLayoutAttr layout = xegpu::getDistributeLayoutAttr (val);
1508- // If no layout is specified, assume the inner most dimension is distributed
1509- // for now.
1508+ // If no layout is specified, that means no distribution.
15101509 if (!layout)
1511- return AffineMap::getMultiDimMapWithTargets (
1512- vecRank, { static_cast < unsigned int >(vecRank - 1 )}, val.getContext ());
1510+ return AffineMap::getMultiDimMapWithTargets (vecRank, {},
1511+ val.getContext ());
15131512 // Expecting vector and layout rank to match.
15141513 assert (layout.getRank () == vecRank &&
15151514 " Expecting vector and layout rank to match" );
1516- // A dimension is distributed if its layout value is > 1 and the dimension
1517- // size is evenly divisible by the layout value.
1515+ // A dimension is distributed only if layout suggests there are
1516+ // multiple lanes assigned for this dimension and the shape can be evenly
1517+ // distributed to those lanes.
15181518 SmallVector<unsigned int > distributedDims;
15191519 for (auto [i, v] : llvm::enumerate (layout.getEffectiveLaneLayoutAsInt ())) {
15201520 if (v > 1 && vecType.getShape ()[i] % v == 0 )
You can’t perform that action at this time.
0 commit comments