[Mlir-commits] [mlir] [mlir][tosa] Remove Convolution Type Verifiers (PR #134077)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Apr 2 05:42:37 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-tosa
Author: Jack Frankland (FranklandJack)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/134077.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/Tosa/IR/TosaOps.cpp (+1-11)
``````````diff
diff --git a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
index cdba332792eb0..b8d81213d9004 100644
--- a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+++ b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
@@ -425,17 +425,7 @@ static LogicalResult verifyConvOpModes(T op) {
if (auto quantType = llvm::dyn_cast<mlir::quant::QuantizedType>(resultEType))
resultEType = quantType.getStorageType();
- // check allowed input/result element types combinations
- if ((inputEType.isInteger(8) && resultEType.isInteger(32)) ||
- (inputEType.isInteger(16) && resultEType.isInteger(48)) ||
- (isa<Float8E5M2Type>(inputEType) && resultEType.isF16()) ||
- (isa<Float8E4M3FNType>(inputEType) && resultEType.isF16()) ||
- (inputEType.isF16() && resultEType.isF16()) ||
- (inputEType.isBF16() && resultEType.isBF16()) ||
- (inputEType.isF32() && resultEType.isF32()))
- return success();
-
- return op.emitOpError("input/output element types are incompatible.");
+ return success();
}
// verify that inType and outType have same element types
``````````
</details>
https://github.com/llvm/llvm-project/pull/134077
More information about the Mlir-commits
mailing list