Anastasia added a comment.

> For instance, OpenCL kernel in SYCL mode initializes lambda captures with
>  the kernel argument values. This initialization code for sampler emits
>  errors because OpenCL disallows sampler on the right hand side of the
>  binary operators - these are supposed to be used only by built-in
>  functions.

Confused - is this already implemented anywhere? Also how about regular use of 
samplers in binary operators?

> Another potential issue is the lambda object itself -
>  captured sampler is a member of the lambda object and OpenCL doesn't
>  allow composite types with samplers. SPIR-V produced from SYCL should be
>  okay as lambda object can be removed by standard LLVM transformation
>  passes.

Can you elaborate on this please.



================
Comment at: clang/lib/Sema/SemaType.cpp:4622
         if (FTI.isVariadic &&
+            !LangOpts.SYCLIsDevice &&
             !(D.getIdentifier() &&
----------------
Does this belong to sampler too?


================
Comment at: clang/test/SemaSYCL/ocl_sampler.cpp:3
+
+#define CLK_ADDRESS_CLAMP_TO_EDGE       2
+#define CLK_NORMALIZED_COORDS_TRUE      1
----------------
It would be nice not to replicate testing completely. Would it work to run 
relevant OpenCL tests in SYCL mode?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63710



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D63710: [SYC... Mariya Podchishchaeva via Phabricator via cfe-commits
    • [PATCH] D63710:... Anastasia Stulova via Phabricator via cfe-commits

Reply via email to