llvm
e2093d23 - [SYCL] Allow work group scratch memory to be used with free function kernels (#19837)

Commit
192 days ago
[SYCL] Allow work group scratch memory to be used with free function kernels (#19837) When a kernel uses implicit local memory such as by way of the `get_work_group_scratch_memory` function, the library is supposed to mark the kernel with the appropriate attribute `WORK_GROUP_STATIC_ATTR` to get things to work at runtime. This is done through the properties passed to the kernel invocation call. For free function kernels however, the infrastructure is not there to do this marking process and usage of the above mentioned function typically results in a UR error. This PR makes some changes at the middle-end level to traverse the call graph wherever the compiler built-in functions `__sycl_allocateLocalMemory` and `__sycl_dynamicLocalMemoryPlaceholder` are used and mark each of the kernels found during this traversal , including free function kernels, with the `WORK_GROUP_STATIC_ATTR` attribute if not already present.
Author
Parents
Loading