[Mlir-commits] [mlir] [MLIR][Vector] Add support for distributing masked writes (PR #71482)

Quinn Dawkins llvmlistbot at llvm.org
Tue Nov 7 06:35:17 PST 2023


qedawkins wrote:

> Actually given we are only handling 1-D distribution in transfer write at the moment, and the fact we are [compressing unused dims when `inferTransferOpMaskType`](https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/Vector/IR/VectorOps.cpp#L3758-L3773), effectively that guarantees we have the same shape as the vector type? I'm a bit confused now; better to get @dcaballe to take another look.
> 
> We can enable support step-by-step. The current impl is fine if we additionally check the transfer write has an identity map I think.

yeah after further thought, n-D masked writes will be quite tricky to handle properly because the warp op does not properly capture the distribution mapping needed by the transfer_write. We would have to do something like, apply the transfer map, distribute, and reverse the map to get back to the original mask shape. Ideally those transposes would cancel, but step-by-step sounds good to me. I'll guard a bit better here, but a discussion about how to think about these masks would be great.

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


More information about the Mlir-commits mailing list