[PATCH] D146448: [CUDA] Update cached kernel handle when the function instance changes.

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 20 16:16:25 PDT 2023


tra added a comment.

In D146448#4207800 <https://reviews.llvm.org/D146448#4207800>, @tra wrote:

> However, `KernelStubs` would still point to the original `F`, and that may potentially be left dangling. Perhaps I should always update both handles and stubs if `F` changes.

Yes, HIP is susceptibel to having the dangling pointer to F. What saves us is that KernelStubs happens to be used only *before* the cached functions are reinstantiated, so we never use those dangling pointers in case of HIP. 
OK, looks like I'll need to fix HIP, too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146448/new/

https://reviews.llvm.org/D146448



More information about the cfe-commits mailing list