llvm icon indicating copy to clipboard operation
llvm copied to clipboard

Implement work_group_static

Open Naghasan opened this issue 1 year ago • 0 comments

The patch partially implements work_group_static and update proposal.

Implemented:

  • work_group_static to handle static allocation in kernel.
  • get_dynamic_work_group_memory to handle runtime allocation, but only on CUDA

work_group_static is implemented by exposing SYCLScope(WorkGroup), allowing the class to be decorated by the attribute and uses the same mechanism during lowering to place the variable in local memory.

get_dynamic_work_group_memory uses a new builtin function, __sycl_dynamicLocalMemoryPlaceholder , which is lowered into referencing a 0 sized array GV when targeting NVPTX. The approach for SPIR will need to differ from this lowering.

Naghasan avatar Aug 13 '24 20:08 Naghasan