[mlir][tosa] Verify zero-dim tensors in the input
As TOSA does not support the tensor with zero dimensions, we can check the zero value for the static shape input. Ideally, we should be able to check the tensor shape more broadly, such as using `CPred` in the TOSA type definition. But based on [[ https://discourse.llvm.org/t/where-can-we-put-the-shared-verification-among-multiple-dialect-ops/71806 | the discussion here ]] It makes input type verification complicated and hard to maintain and still only applies to the case the input is statically shaped. Therefore, in this change, we have put the zero dimension check in the verification of each op, which would be flexible and maintainable. See: https://github.com/llvm/llvm-project/issues/63212 Reviewed By: eric-k256 Differential Revision: https://reviews.llvm.org/D154569
parent
b4a82b62
Please register or sign in to comment