[SYCL][ESIMD][EMU] Atomicity control for ESIMD_EMULATOR plug-in
- Dominant language
- LLVM
- Stars
- 1.5k
- Forks
- 854
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 137
Description
Atomicity control in ESIMD_EMULATOR plug-in implementation uses dynamic allocation for global locks at module construction.
Comment by @lsatanov : https://github.com/intel/llvm/pull/4748#discussion_r803693105
This type of implementation was imported from level_zero and it is noted that there is memory leak in level_zero plug-in implementation. ESIMD_EMULATOR implementation has same comments for corresponding implementation.
https://github.com/intel/llvm/blob/e6d0547e9d99b5a56430c4749f6c7e328bf221ab/sycl/plugins/level_zero/pi_level_zero.cpp#L394
https://github.com/intel/llvm/blob/e6d0547e9d99b5a56430c4749f6c7e328bf221ab/sycl/plugins/level_zero/pi_level_zero.cpp#L7591
@romanovvlad suggested relocating global variable (including locks) allocation to `piInitialize` and deallocation to `piTearDown`
https://github.com/intel/llvm/pull/4748#discussion_r808330749
@dongkyunahn-intel will create a PR designated for this issue as soon as on-going changes and fixes are applied in ESIMD_EMULATOR plug-in implementation.
Contributor guide
Assessment
This issue has not been assessed yet.