[mlir][tosa] Add verifiers to ReduceOps, fix shape inference crash (#69843)
This patch adds verifiers to `tosa.reduce_*` ops that check, among other things, that the supplied `axis` argument is compatible with the input/output tensors' shapes. We allow for a special case of `axis == 0 && rank == 0` to be valid. This patch also adds a check to `ReduceInferReturnTypes()` to ensure that the shape inference pass doesn't crash on an invalid `axis` argument anymore. Fix https://github.com/llvm/llvm-project/issues/68187
Loading
Please sign in to comment