Skip to content

Commit

Permalink
Fix Blocked FMA path in isLayoutOK (#5260)
Browse files Browse the repository at this point in the history
  • Loading branch information
lezcano authored Nov 26, 2024
1 parent 68a08dd commit 3f1d70f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/Conversion/TritonGPUToLLVM/ConvertLayoutOpToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,16 @@ struct ConvertLayoutOpUsingLinearLayoutsConversion
// completed before we can remove the layoutIsOK check:
// 1. Support for AMD's WMMA
std::function<bool(Attribute)> layoutIsOK = [&](Attribute layout) {
if (auto dotOperand = dyn_cast<DotOperandEncodingAttr>(layout)) {
layout = dotOperand.getParent();
}

if (isa<NvidiaMmaEncodingAttr, AMDMfmaEncodingAttr>(layout)) {
return !useLegacyMMAConversion;
}
if (auto dotOperand = dyn_cast<DotOperandEncodingAttr>(layout)) {
if (isa<NvidiaMmaEncodingAttr, AMDMfmaEncodingAttr>(
dotOperand.getParent())) {
return !useLegacyMMAConversion;
}
return false;
}
if (isa<BlockedEncodingAttr, LinearEncodingAttr>(layout)) {
return true;
}
Expand Down

0 comments on commit 3f1d70f

Please sign in to comment.