Average pool assumed the same input/output type. Result type for integers
is always an i32, should be updated appropriately.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
If the output should always be i32, could you add verification to the op for this? That would have avoided this error.
mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td | ||
---|---|---|
72 | So this is limited to f32, i8, or i32? It would be nice to express those constraints with type constraints instead of custom verification. | |
mlir/lib/Dialect/Tosa/IR/TosaOps.cpp | ||
355–360 | Please add failure messages with emitOpError(). Longer term, it would be better to do this with return type inference. |
mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td | ||
---|---|---|
72 | I agree we should update this restriction, but that should be done as a separate pass with fixing tests. It is surprisingly common to find tests that use slightly incorrect types. |
mlir/lib/Dialect/Tosa/IR/TosaOps.cpp | ||
---|---|---|
362–364 | This returns LogicalResult so you can combine them. |
mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td | ||
---|---|---|
72 | Yeah upsettingly common :-/ That's why I push hard for verifiers |
So this is limited to f32, i8, or i32? It would be nice to express those constraints with type constraints instead of custom verification.