[llvm] [Offload] Store kernel name in GenericKernelTy (PR #142799)
Ross Brunton via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 5 03:14:56 PDT 2025
RossBrunton wrote:
As well as the various `INFO` calls, it is also used for the Record/Replay thing. Regardless, I think the following is UB with current liboffload:
```c++
ol_kernel_handle_t kernel;
if (someOption()) {
std::string name = getOptionValue();
olGetKernel(program, name.c_str(), &kernel);
} else {
olGetKernel(program, "main", &kernel);
}
olLaunchKernel(device, kernel, [...]);
```
Although I think it might only be UB when certain debugging flags are set (which probably is going to make it more of a pain if there are issues).
https://github.com/llvm/llvm-project/pull/142799
More information about the llvm-commits
mailing list