Skip to content

Commit

Permalink
When lowering linalg to call, also link the parent air.herd to the fu…
Browse files Browse the repository at this point in the history
…nc declaration
  • Loading branch information
erwei-xilinx committed Feb 24, 2025
1 parent f2e9e80 commit 7d91fa0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mlir/lib/Conversion/AIRToAIEPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3679,6 +3679,12 @@ class AIRLinalgOpToLibraryCallRewrite
op, fnNameAttr.getValue(), TypeRange(),
ValueRange(ArrayRef<Value>(libFnOperands)));

if (auto herd = op->getParentOfType<air::HerdOp>())
rewriter.modifyOpInPlace(herd, [&]() {
herd->setAttr("link_with",
StringAttr::get(rewriter.getContext(), linkWith));
});

return success();
}

Expand Down

0 comments on commit 7d91fa0

Please sign in to comment.