[Mlir-commits] [mlir] [MLIR][XeGPU] TensorDesc Type support generic DistributeLayout instead of Layout (PR #190401)

Jianhui Li llvmlistbot at llvm.org
Wed Apr 8 13:47:55 PDT 2026


Jianhui-Li wrote:

> overall code change looks good.
> 
> Can you explain a bit about the background on why this is needed? With this change someone can write ND loads with slice layout (i.e. in certain dim data must be shared). How is this lowered? Do we use load_nd with broadcast to materialize the sharing? If that is the case, why not break down the tensor_desc with slice layout to equivalent layout with plain layout + broadcast.

This comes out of refactoring that I try to recover temporary layout from anchor layout.  It turns out that the limitation of TensorDesc causes unnecessary special-case handling.  Removing the limitation allows the refactored code being more generic. 

The lowering happens as is based on effective layout and coordination compute.  There is no need to lower to load_nd with broadcast, each sg/lane load_nd has its coordination, some of them may overlap due to slice layout, so they load back the same result.

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


More information about the Mlir-commits mailing list