Skip to content

Commit e33df88

Browse files
committed
fix order for DPAS
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 4b7942a commit e33df88

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/Dialect/TritonGPU/IR/Dialect.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,15 @@ SmallVector<unsigned> getOrder(Attribute layout) {
304304
}
305305
if (auto dotLayout = dyn_cast<DotOperandEncodingAttr>(layout)) {
306306
auto rank = getWarpsPerCTA(dotLayout.getParent()).size();
307+
// FIXME: delete if branch for `DpasEncodingAttr` and provide more
308+
// general solution to make `getOrderForDotOperand` function compatible
309+
// with Intel layouts.
310+
// More details: https://github.com/intel/intel-xpu-backend-for-triton/pull/2517
311+
if (dyn_cast<intel::DpasEncodingAttr>(dotLayout.getParent())) {
312+
SmallVector<unsigned> order(rank);
313+
std::iota(order.rbegin(), order.rend(), 0);
314+
return order;
315+
}
307316
return getOrderForDotOperand(dotLayout.getOpIdx(), rank);
308317
}
309318
if (auto sliceLayout = dyn_cast<SliceEncodingAttr>(layout)) {

0 commit comments

Comments
 (0)