[PATCH] D71016: [SYCL] Implement OpenCL kernel function generation

Thorsten via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 14 05:16:20 PDT 2021


tschuett added a comment.

In D71016#3063706 <https://reviews.llvm.org/D71016#3063706>, @bader wrote:

> In D71016#3063457 <https://reviews.llvm.org/D71016#3063457>, @tschuett wrote:
>
>> It feels like you are doing codegen(OpenCL kernel) in Sema. Are OpenCL kernels the only approach.
>
> We need to update the description of the patch to clarify that it applies to other GPU programming models as well. When the patch was uploaded SYCL targeted OpenCL kernels only and today the downstream implementation can target CUDA, HIP and Intel oneAPI Level Zero kernels as well.
> SYCL kernel is defined as C++ callable type, but typical GPU kernel interface is a C-like function. In addition to that there might be additional restrictions on passing data from the host system (e.g. image types can be passed as a member of C++ class, etc.). The solution here is emit a wrapper function, which initializes and invokes SYCL callable object.
>
> Does it answer your question or you would like to see changes in addition to the description update?

Would a codegenSYCL directory help you to separate Sema from code generation?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71016/new/

https://reviews.llvm.org/D71016



More information about the cfe-commits mailing list