[llvm] [Offload] Erase entries from JIT cache when program is destroyed (PR #148847)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 23 05:59:33 PDT 2025


================
@@ -285,8 +285,8 @@ JITEngine::compile(const __tgt_device_image &Image,
 
   // Check if we JITed this image for the given compute unit kind before.
   ComputeUnitInfo &CUI = ComputeUnitMap[ComputeUnitKind];
-  if (__tgt_device_image *JITedImage = CUI.TgtImageMap.lookup(&Image))
----------------
shiltian wrote:

A SHA value based on the contents of the image could do it. In that way, even the image "handler" can be created and destroyed multiple times, the contents of the image is expected to be the same.

I'll not be the blocker here. This is less ideal but I'm fine with it.

https://github.com/llvm/llvm-project/pull/148847


More information about the llvm-commits mailing list