Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jokeren committed Aug 9, 2024
1 parent 31ad7d6 commit 593e5fa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Dialect/TritonGPU/IR/LinearLayoutConversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ LinearLayout ensureLayoutNotLargerThan(
continue;
}
assert(actualSize % desiredSize == 0);
// <inDimName, baseIdx, baseValue>
// <inDimName, baseIdx, outValue>
std::vector<std::tuple<StringAttr, int, int>> sortedBases;
for (auto [inDimName, basis] : bases) {
for (size_t baseIdx = 0; baseIdx < basis.size(); baseIdx++) {
Expand All @@ -177,9 +177,8 @@ LinearLayout ensureLayoutNotLargerThan(
llvm::sort(sortedBases,
[](auto a, auto b) { return std::get<2>(a) > std::get<2>(b); });
for (auto [inDimName, basisIdx, outValue] : sortedBases) {
if (actualSize <= desiredSize) {
if (actualSize <= desiredSize)
break;
}
bases[inDimName][basisIdx][outDim.index()] = 0;
actualSize >>= 1;
}
Expand Down

0 comments on commit 593e5fa

Please sign in to comment.