[Mlir-commits] [mlir] [mlir] Drop outermost dims in slice rank reduction inference (PR #95020)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Jun 11 07:36:33 PDT 2024


Max191 wrote:

> > convention of dropping outermost unit dimensions first when inferring a rank reduction mask for a slice
> 
> Where is this convention coming from? I always thought it is unspecified which dimension is dropped.

This is not very well documented throughout the codebase, but it is documented here: https://mlir.llvm.org/docs/Dialects/TensorOps/#verification-vs-inference-in-the-rank-reduced-case. I have felt this is sort of an undocumented convention, but it should probably be better documented and enforced.

Also, extract/insert ops should probably have some additional arguments to specify which dimensions are being inserted along, but that is out of the scope of this PR. Probably a good discussion for another time, though.

https://github.com/llvm/llvm-project/pull/95020


More information about the Mlir-commits mailing list