Fix stale device global initializers on RTC program reuse#21730
Fix stale device global initializers on RTC program reuse#21730
Conversation
Prevent stale MDeviceGlobalInitializers entries from colliding with new entries when program handles are reused in RuntimeCompiled kernel loops. Implement explicit cleanup via removeDeviceGlobalInitializer() during program teardown.
|
This change is required to fix this test failure: https://github.com/intel/llvm/actions/runs/24240135791/job/70775597393?pr=21728
I have extended the sycl_device_globals test to catch this: (#21728) Additional info: |
That's an E2E test, but since we have a dedicated unit test for the cleanup mechanism when removing images, I think it should be updated to include this too. |
593ea5c to
da616c9
Compare

Prevent stale MDeviceGlobalInitializers entries from colliding with new entries when program handles are reused in RuntimeCompiled kernel loops. Implement explicit cleanup via removeDeviceGlobalInitializer() during program teardown.