Skip to content
Unverified Commit 8a57bc09 authored by Felix Schneider's avatar Felix Schneider Committed by GitHub
Browse files

[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
parent d593f6cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment