Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ class ElementwiseOpConversionBase : public ConvertOpToLLVMPattern<SourceOp> {
// encoding not available
return resultVals;
Attribute baseEncoding = encoding;
if (isa<AMDMfmaEncodingAttr>(baseEncoding))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are sliced of Mfma okay? Shouldn't this check go line 95

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slice of mfma is ok after #3870

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add some comments on why skipping here to be clear?

// TODO: this logic seems incorrect for mfma layout. Skip for now.
// We saw mismatches for some flash-attention tests on AMD backend.
// Note that this logic works for sliced layout whose parent is
// mfma layout. Therefore, this is not combined with the following check.
return resultVals;
while (auto sliced = dyn_cast<SliceEncodingAttr>(baseEncoding))
baseEncoding = sliced.getParent();
if (isa<NvidiaMmaEncodingAttr, DotOperandEncodingAttr>(baseEncoding)) {
Expand Down