[Mlir-commits] [mlir] [MLIR][XeGPU] Distribute vector.step & vector.shape_cast op from wg to sg (PR #155443)
Nishant Patel
llvmlistbot at llvm.org
Fri Sep 5 08:05:01 PDT 2025
================
@@ -563,9 +545,11 @@ struct WgToSgElementwiseOp : public ConversionPattern {
// Copy all attributes, but update "layout_result_0" to drop
// sgLayout/sgData
for (auto attr : op->getAttrs()) {
- if (auto layout = dyn_cast<xegpu::LayoutAttr>(attr.getValue())) {
- if (auto newLayout = layout.dropSgLayoutAndData())
- state.addAttribute(attr.getName(), newLayout);
+ if (auto layout =
+ dyn_cast<xegpu::DistributeLayoutAttr>(attr.getValue())) {
+ if (!layout.getLaneLayoutAsInt().empty() ||
+ !layout.getLaneDataAsInt().empty())
+ state.addAttribute(attr.getName(), layout.dropSgLayoutAndData());
----------------
nbpatel wrote:
calling it directly fails in the verifier of Slice Attribute since layout can now be either slice or layout...I think it requires some changes and clean up in the attributes...I will do it in one of the subsequent PRs
https://github.com/llvm/llvm-project/pull/155443
More information about the Mlir-commits
mailing list