-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYCL] Redesign pointer handling for OpenCL kernel generation #6728
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I've spent noticeable amount of time to understand the code, I'm not opposed to the approach itself. We just need to make sure that everything works fine, I see that some LIT tests are failing and llvm-test-suite tests didn't run.
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the detailed review @Fznamznon.
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.