Skip to content

Commit

Permalink
Enforce vnni shape to be mod 2
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-smnk committed Jan 16, 2025
1 parent 9aa7b9b commit c7d5a5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/TPP/Transforms/Utils/VNNIUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ bool isInVnniLayout(int64_t expectedRank, ShapedType shape,
if (shape.getRank() != expectedRank || !shape.getElementType().isBF16())
return false;

if (shape.getShape().back() % 2 != 0)
return false;

if (blockingFactor && shape.getShape().back() != *blockingFactor)
return false;

Expand Down

0 comments on commit c7d5a5d

Please sign in to comment.