-
Notifications
You must be signed in to change notification settings - Fork 794
[NFC][SYCL] Don't emit OpenCL metadata for SYCL #17723
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
Conversation
…rnels. Elizabeth's changes to perform code generation for SYCL kernel device entry point functions caused the following kernel metadata annotations to be emitted for all device targets. - `kernel_arg_addr_space` - `kernel_arg_access_qual` - `kernel_arg_type` - `kernel_arg_base_type` - `kernel_arg_type_qual` It turns out that such metadata is not needed for SYCL; the above annotations are only needed for OpenCL. Investigation revealed that these annotations are emitted by the oneAPI compiler for ESIMD functions, but that was apparently due to an incorrect merge conflict resolution that is now being addressed by intel/llvm#17723. The above annotations are referenced by the SPIR-V Translator documentation. See https://github.com/KhronosGroup/SPIRV-LLVM-Translator/blob/main/docs/SPIRVRepresentationInLLVM.rst#function-metadata. The oneAPI compiler does emit a `kernel_arg_buffer_location` annotation that is presumed to be needed as part of the support for the dead kernel argument elimination pass. Support for that annotation does not yet exist upstream.
|
|
||
| // CHECK: define dso_local spir_kernel {{.*}} !kernel_arg_addr_space ![[#MD:]] | ||
| // CHECK: !kernel_arg_access_qual ![[#MD]] !kernel_arg_type ![[#MD]] !kernel_arg_base_type ![[#MD]] !kernel_arg_type_qual ![[#MD]] !kernel_arg_accessor_ptr ![[#MD]] | ||
| // CHECK: define dso_local spir_kernel {{.*}} !sycl_kernel_omit_args ![[#MD:]] |
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.
@intel/dpcpp-esimd-reviewers, I'm sure I understand the purpose of this test, but I tried to check that "dead argument elimination" optimization attaches metadata correctly.
It looks like original test verifies that other metadata do not refer to deleted argument. Should I check for !kernel_arg_accessor_ptr?
I removed it because "dead argument elimination" should not change the value of this metadata. It will be empty in any case.
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.
your change looks fine thx
|
CI results analysis: SYCL Pre Commit on Windows / build / Build + LIT (pull_request) Jenkins/Precommit |
|
@intel/dpcpp-cfe-reviewers, ping. |
kernel_arg_addr_space,kernel_arg_access_qual,kernel_arg_type,kernel_arg_base_typeandkernel_arg_type_qualmetadata are designed to provide information about kernel arguments to clGetKernelInfo function.SYCL does not provide similar information through API.