File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -299,8 +299,12 @@ SmallVector<unsigned> getOrder(Attribute layout) {
299299 }
300300 if (auto dotLayout = dyn_cast<DotOperandEncodingAttr>(layout)) {
301301 auto rank = getWarpsPerCTA (dotLayout.getParent ()).size ();
302- auto mmaParent = dyn_cast<MmaEncodingTrait>(dotLayout.getParent ());
303- return mmaParent.getOrderForDotOperand (dotLayout.getOpIdx (), rank);
302+ if (auto mmaParent = dyn_cast<MmaEncodingTrait>(dotLayout.getParent ())) {
303+ return mmaParent.getOrderForDotOperand (dotLayout.getOpIdx (), rank);
304+ }
305+ // This branch had to be left because not all types
306+ // inherit `MmaEncodingTrait` interface, for example `BlockedEncodingAttr`.
307+ return getOrderForDotOperand (dotLayout.getOpIdx (), rank);
304308 }
305309 if (auto sliceLayout = dyn_cast<SliceEncodingAttr>(layout)) {
306310 SmallVector<unsigned > parentOrder = getOrder (sliceLayout.getParent ());
You can’t perform that action at this time.
0 commit comments