[Mlir-commits] [mlir] [mlir][gpu] Add optional attributes of kernelModule and kernelFunc for outlining kernels. (PR #118861)
Valentin Clement バレンタイン クレメン
llvmlistbot at llvm.org
Thu Dec 5 12:44:54 PST 2024
================
@@ -364,17 +364,25 @@ class GpuKernelOutliningPass
Block::iterator insertPt(func->getNextNode());
auto funcWalkResult = func.walk([&](gpu::LaunchOp op) {
SetVector<Value> operands;
- std::string kernelFnName =
- Twine(op->getParentOfType<SymbolOpInterface>().getName(), "_kernel")
- .str();
+ std::string kernelFnName;
+ if (op.hasKernelFuncName()) {
+ kernelFnName = op->getAttrOfType<mlir::SymbolRefAttr>("kernelFunc")
----------------
clementval wrote:
Why not using the generated getter?
https://github.com/llvm/llvm-project/pull/118861
More information about the Mlir-commits
mailing list