[Mlir-commits] [mlir] [MLIR][XeGPU] Distribute vector.step & vector.shape_cast op from wg to sg (PR #155443)

Igor Zamyatin llvmlistbot at llvm.org
Tue Aug 26 16:47:03 PDT 2025


================
@@ -535,8 +535,17 @@ struct WgToSgElementwiseOp : public ConversionPattern {
 
     ArrayRef<int64_t> wgShape = resultType.getShape();
 
-    xegpu::LayoutAttr layout = xegpu::getLayoutAttr(op->getResult(0));
-    if (!layout || !layout.getSgLayout())
+    auto layoutName = xegpu::getLayoutName(op->getResult(0));
+    auto attr = op->getAttr(layoutName);
+
+    xegpu::DistributeLayoutAttr layout = nullptr;
----------------
Garra1980 wrote:

make it static function maybe? seems like it is used in many places

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


More information about the Mlir-commits mailing list