[SYCL] Redesign pointer handling for OpenCL kernel generation#6728
[SYCL] Redesign pointer handling for OpenCL kernel generation#6728pvchupin merged 19 commits intointel:syclfrom
Conversation
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
|
There's still some Clang tests to fix. I fix one test to illustrate what this PR does. Before fixing the others, I figured I should ensure memcpy is actually working as expected via a runtime test. I'll take a look at that tomorrow |
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
|
PR is ready for review. |
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
|
Reverted PR to Draft because arrays of type containing pointer is broken. The code to exclude such cases from this logic is incorrect. Looking into a possible solution now. |
…ents Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
Signed-off-by: Elizabeth Andrews <elizabeth.andrews@intel.com>
|
ping @intel/llvm-gatekeepers. This PR is ready for review and merge. The failing CUDA Test suite looks like an infrastructure issue. |
|
@elizabethandrews, can you follow up on post commit issues on windows? https://github.com/intel/llvm/actions/runs/3137630364/jobs/5096023697 |
Fixed here - #6895 |
Requirement - Do not decompose types with pointers when generating OpenCL kernel arguments.
This PR adds logic to stop decomposing trivial types containing pointers. For every SYCL kernel argument which is a record type containing a pointer (or has a field or a base class with a pointer), we generate a new record type with all pointers in __global address space. This compiler generated type is the openCL kernel argument. In the kernel body, we initialize the local clone via memcpy.
Limitations:
Both limitations above will hopefully be fixed in follow-up PRs.