Skip to content

Commit

Permalink
Add proper vnni check
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-smnk committed Jan 9, 2025
1 parent aac340a commit 6513c14
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,9 @@ struct ConvertGenericToVnniMatmulLikeOp
// by the earlier check) that splits the K dim in the shape.
std::optional<int64_t> vnniFactor =
vnni::utils::getVnniBlockingFactor(bufferB.getType());
assert(vnniFactor && "Must be in VNNI format");
if (!vnniFactor)
return rewriter.notifyMatchFailure(genericOp,
"failed to determine VNNI factor");
int64_t k =
cast<ShapedType>(bufferA.getType()).getShape()[kPos] * *vnniFactor;
int64_t batch = 0;
Expand Down

0 comments on commit 6513c14

Please sign in to comment.