Skip to content

Commit f502c66

Browse files
committed
Remove TensorDesc invariant checks from op verifier
1 parent 5df9cf0 commit f502c66

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ LogicalResult TensorDescType::verify(
261261

262262
if (scatterAttr) {
263263
// Validate subgroup mapping rules for scattered tensors.
264+
// A work-item's slice of the tensor with shape [sg_size] or
265+
// [sg_size, chunk_size] will be [1] or [1, chunks_size] respectively,
266+
// the mapping should reflect that.
264267
if (wiData[0] != 1)
265268
return emitError()
266269
<< "cannot map over non-contiguous scattered row elements";

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

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -458,22 +458,7 @@ LogicalResult CreateDescOp::verify() {
458458
if (shape != tdescShape)
459459
return emitOpError("Incorrect TensorDesc shape. ")
460460
<< "Expected is " << makeString(shape) << "\n";
461-
if (auto sgMap = tdescTy.getSGMapAttr()) {
462-
// A work-item's slice of the TensorDesc with shape [sg_size] or
463-
// [sg_size, chunk_size] will be [1] or [1, chunks_size] respectively,
464-
// the mapping should reflect that.
465-
if (sgMap.getWiData()[0] > 1)
466-
return emitOpError("TensorDesc's SG map only supports multiple elements "
467-
"contiguous along rows.");
468-
if (chunkSize != static_cast<int>(sgMap.getWiData()[1]))
469-
return emitOpError(
470-
"TensorDesc's chunkSize must match WI's data mapping.");
471-
if (int rank = tdescTy.getRank();
472-
(sgMap.getWiLayout()[2 - rank] != tdescShape[0]))
473-
return emitOpError("Detected a conflict between SG map's work-item "
474-
"layout and TensorDesc shape. Check the index of "
475-
"`subgroup_size` in WI layout map.");
476-
}
461+
477462
return success();
478463
}
479464

0 commit comments

Comments
 (0)