Skip to content

Commit 103db33

Browse files
committed
Validate tensor descriptor rank against a value rank
1 parent b1cef75 commit 103db33

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ static bool isArgShapesValid(ArrayRef<int64_t> descShape,
8787
if (!sgMap)
8888
return false;
8989

90+
if (valShape.size() != descShape.size())
91+
return false;
92+
9093
for (const auto &[factor, dim, expected] :
9194
llvm::zip_equal(sgMap.getWiLayout(), valShape, descShape)) {
9295
if (factor * dim != expected)

0 commit comments

Comments
 (0)