Skip to content

Commit

Permalink
Implement DotOperandEncodingAttr::getSizePerThread with block layout …
Browse files Browse the repository at this point in the history
…as parent

Signed-off-by: Anatoly Myachev <[email protected]>
  • Loading branch information
anmyachev committed Feb 8, 2025
1 parent de0f754 commit f74656b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Dialect/TritonGPU/IR/Dialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2213,10 +2213,11 @@ SmallVector<unsigned> DotOperandEncodingAttr::getSizePerThread() const {
assert(parentLayout && "DotOperandEncodingAttr must have a parent");
if (auto parentMmaLayout = mlir::dyn_cast<MmaEncodingTrait>(parentLayout)) {
return parentMmaLayout.getSizePerThreadForOperand(getKWidth(), getOpIdx());
} else if (auto blocked = mlir::dyn_cast<BlockedEncodingAttr>(parentLayout)) {
return expandMatrixShapeWithBatch(ArrayRef(blocked.getSizePerThread()));
} else {
llvm::report_fatal_error(
"DotOperandEncodingAttr non-NvidiaMmaEncodingAttr parent not "
"supported yet");
"getSizePerThread not implemented for DotOperandEncodingAttr");
return {};
}
}
Expand Down

0 comments on commit f74656b

Please sign in to comment.