[PATCH] D142445: [mlir][tensor|memref] Harden the checks on dim op

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 03:14:29 PST 2023


qcolombet added a comment.

I am going to go ahead with the patch as is for now, but I found the exact same issue with `shape.dim`.
I don't know what the fix should look like though because the description says:

  Gets the extent indexed by `dim` from the shape of the `value` operand. If
  the index is error or out-of-bound then it returns an invalid size if the
  return type carries error information else the behavior is undefined.

What is this type carries error thing and how do you propagate the information there?
Right now we would just bail out in the verifier.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142445/new/

https://reviews.llvm.org/D142445



More information about the llvm-commits mailing list