-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LAYOUTS] Use LLs for Hopper whenever we wouldn't use ldmatrix #5235
Changes from 5 commits
2b2032f
cbf00e2
baf6783
91e46b3
68c8513
de18e21
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -376,28 +376,14 @@ struct ConvertLayoutOpUsingLinearLayoutsConversion | |
// completed before we can remove the layoutIsOK check: | ||
// 1. Support for AMD's WMMA | ||
std::function<bool(Attribute)> layoutIsOK = [&](Attribute layout) { | ||
if (isa<NvidiaMmaEncodingAttr, AMDMfmaEncodingAttr>(layout)) { | ||
return !useLegacyMMAConversion; | ||
} | ||
if (auto dotOperand = dyn_cast<DotOperandEncodingAttr>(layout)) { | ||
auto parent = dotOperand.getParent(); | ||
if (isa<MmaEncodingTrait>(parent) && useLegacyMMAConversion) { | ||
return false; | ||
} | ||
if (auto nvidiaMma = dyn_cast<NvidiaMmaEncodingAttr>(parent)) { | ||
if (nvidiaMma.isAmpere()) { | ||
return true; | ||
} | ||
} | ||
if (isa<AMDMfmaEncodingAttr>(parent)) { | ||
return true; | ||
} | ||
return false; | ||
layout = dotOperand.getParent(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure this is a correct change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I agree that blocked FMA has to be fixed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, right, let me send a fix |
||
} | ||
if (isa<BlockedEncodingAttr>(layout)) { | ||
return true; | ||
|
||
if (isa<NvidiaMmaEncodingAttr, AMDMfmaEncodingAttr>(layout)) { | ||
return !useLegacyMMAConversion; | ||
} | ||
if (isa<LinearEncodingAttr>(layout)) { | ||
if (isa<BlockedEncodingAttr, LinearEncodingAttr>(layout)) { | ||
return true; | ||
} | ||
if (auto slice = dyn_cast<SliceEncodingAttr>(layout)) { | ||
|
@@ -408,6 +394,10 @@ struct ConvertLayoutOpUsingLinearLayoutsConversion | |
if (!layoutIsOK(srcTy.getEncoding()) || !layoutIsOK(dstTy.getEncoding())) { | ||
return failure(); | ||
} | ||
// FIXME [Dot LL] Remove this once we implement this trick in LLs | ||
if (matchMmaV3AndDotOperandLayout(srcTy, dstTy)) { | ||
return failure(); | ||
} | ||
|
||
// The following check can be removed when generalized warp shuffle | ||
// conversions are ready: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny .gitignore change for
pytest
.