File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
mlir/lib/Dialect/XeGPU/Utils Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,8 @@ xegpu::LayoutAttr xegpu::getLayoutAttr(const Value value) {
141141 auto parentOp = arg.getOwner ()->getParentOp ();
142142 if (auto loop = dyn_cast<LoopLikeOpInterface>(parentOp)) {
143143 OpOperand *tiedInit = loop.getTiedLoopInit (arg);
144- return getLayoutAttr (tiedInit->get ());
144+ if (tiedInit)
145+ return getLayoutAttr (tiedInit->get ());
145146 }
146147 }
147148
@@ -178,11 +179,15 @@ void xegpu::setLayoutAttrs(Operation *op,
178179 function_ref<LayoutAttr(Value)> getLayoutImpl) {
179180 op->walk ([&](Operation *nestOp) {
180181 for (OpOperand &opr : nestOp->getOpOperands ()) {
182+ llvm::dbgs () << " set layout for: " << opr.get ();
181183 auto layout = getLayoutImpl (opr.get ());
184+ llvm::dbgs () << " with: " << layout << " \n " ;
182185 setLayoutAttr (opr, layout);
183186 }
184187 for (OpResult result : nestOp->getOpResults ()) {
188+ llvm::dbgs () << " set layout for: " << result;
185189 auto layout = getLayoutImpl (result);
190+ llvm::dbgs () << " with: " << layout << " \n " ;
186191 setLayoutAttr (result, layout);
187192 }
188193 });
You can’t perform that action at this time.
0 commit comments