Skip to content

Commit 230ad91

Browse files
committed
[mlir][tosa] Remove Convolution Type Verifiers
Remove the test in the convolution verifier that checks the input and output element types of convolution operations conform to the constraints imposed by the TOSA 1.0 specification. These checks are too strict for users of the TOSA dialect who wish to allow more types than those allowed by the spec and provide compatibility issues with earlier TOSA implementation which allowed more type combinations. Users who do wish to constrain the convolution types combination to only those allowed by the TOSA 1.0 spec should run the TOSA validation pass which already performs these checks. Signed-off-by: Jack Frankland <[email protected]>
1 parent c309abd commit 230ad91

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

mlir/lib/Dialect/Tosa/IR/TosaOps.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -425,17 +425,7 @@ static LogicalResult verifyConvOpModes(T op) {
425425
if (auto quantType = llvm::dyn_cast<mlir::quant::QuantizedType>(resultEType))
426426
resultEType = quantType.getStorageType();
427427

428-
// check allowed input/result element types combinations
429-
if ((inputEType.isInteger(8) && resultEType.isInteger(32)) ||
430-
(inputEType.isInteger(16) && resultEType.isInteger(48)) ||
431-
(isa<Float8E5M2Type>(inputEType) && resultEType.isF16()) ||
432-
(isa<Float8E4M3FNType>(inputEType) && resultEType.isF16()) ||
433-
(inputEType.isF16() && resultEType.isF16()) ||
434-
(inputEType.isBF16() && resultEType.isBF16()) ||
435-
(inputEType.isF32() && resultEType.isF32()))
436-
return success();
437-
438-
return op.emitOpError("input/output element types are incompatible.");
428+
return success();
439429
}
440430

441431
// verify that inType and outType have same element types

0 commit comments

Comments
 (0)