[PATCH] D60455: [SYCL] Add support for SYCL device attributes

Alexey Bader via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 15 02:47:47 PDT 2019


bader added inline comments.


================
Comment at: clang/test/SemaSYCL/device-attrubutes.cpp:8-11
+__attribute((sycl_kernel)) void foo();
+__attribute((sycl_device)) void foo1();
+[[clang::sycl_kernel]] void foo2();
+[[clang::sycl_device]] void foo3();
----------------
Fznamznon wrote:
> bader wrote:
> > This duplicates clang/test/SemaSYCL/device-attributes-on-non-sycl.cpp.
> > Maybe it make sense to test case when both attributes are applied to the same function.
> From current documentation: sycl_kernel can be applied to function which can be directly called by the host and will be compiled for device, sycl_device applies to device functions which **cannot** be directly called by the host... 
> I think if we want add this test case we need clarify how this case will be handled by the compiler.
> From current documentation: sycl_kernel can be applied to function which can be directly called by the host and will be compiled for device, sycl_device applies to device functions which cannot be directly called by the host... 
> I think if we want add this test case we need clarify how this case will be handled by the compiler.

I would expect `sycl_kernel` to supersede `sycl_device` attribute. Basically `sycl_kernel` include functionality of `sycl_device` attribute and provides additional host accessibility.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60455





More information about the cfe-commits mailing list