Skip to content

Commit d281a14

Browse files
committed
fix an error after mering with main
1 parent 2a16d11 commit d281a14

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

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

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -298,17 +298,10 @@ LogicalResult TensorDescType::verify(
298298
"contiguous elements";
299299
}
300300

301-
// For 1D tensor, pad the shape with an outer unit dimension to allow common
302-
// validation logic.
303-
SmallVector<int64_t> tensorShape(shape);
304-
if (rank == 1)
305-
tensorShape = {1, tensorShape.back()};
306-
307-
size_t dims = tensorShape.size();
308-
for (size_t i = 0; i < dims; ++i) {
301+
for (size_t i = 0; i < shape.size(); ++i) {
309302
uint32_t numElemPerWi = laneLayout[i] * laneData[i];
310-
if (tensorShape[i] < numElemPerWi || tensorShape[i] % numElemPerWi != 0)
311-
return emitError() << "cannot distribute " << tensorShape[i] << " over "
303+
if (shape[i] < numElemPerWi || shape[i] % numElemPerWi != 0)
304+
return emitError() << "cannot distribute " << shape[i] << " over "
312305
<< laneLayout[i] << " work items with "
313306
<< laneData[i] << " elements each";
314307
}

0 commit comments

Comments
 (0)