Skip to content

Commit

Permalink
Improve readability for isInVnniLayout (NFC) (#808)
Browse files Browse the repository at this point in the history
  • Loading branch information
chelini authored Nov 27, 2023
1 parent 95e4a7d commit 45d00a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/TPP/Transforms/Utils/VNNIUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ std::optional<int64_t> getVnniBlockingFactor(Type type) {
bool isInVnniLayout(MemRefType memref) {
if (memref.getRank() < 3 || !memref.getElementType().isBF16())
return false;
return memref.getShape()[memref.getRank() - 1] ==
vnni::utils::getVnniBlockingFactor(memref);
return memref.getShape().back() == vnni::utils::getVnniBlockingFactor(memref);
}

} // namespace utils
Expand Down

0 comments on commit 45d00a1

Please sign in to comment.