Skip to content
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

Sync Khronos OpenCL-Header cl_intel_mem_alloc_buffer_location extension #62

Merged
merged 2 commits into from
Jan 21, 2022

Conversation

sherry-yuan
Copy link
Contributor


Done to align with buffer location opencl extension in https://github.com/KhronosGroup/OpenCL-Headers/blob/80c10b1f65b932894b830da7cd37bc56c541bae4/CL/cl_ext.h#L2350-L2361

This extension allows user to specify which device global memory the memory should be allocated to.

@sherry-yuan sherry-yuan self-assigned this Jan 19, 2022
@sherry-yuan sherry-yuan added the enhancement New feature or request label Jan 19, 2022
@sherry-yuan sherry-yuan modified the milestones: 2022.2, 2022.3 Jan 19, 2022
@sherry-yuan sherry-yuan requested a review from pcolberg January 19, 2022 20:39
@pcolberg
Copy link
Contributor

Great upstream work, Sherry 🙂

Instead of copying only the new cl_intel_mem_alloc_buffer_location section, would you like to update the OpenCL headers to the latest version containing your change? We want to ensure that these are an exact copy of upstream at any time.

@sherry-yuan
Copy link
Contributor Author

sherry-yuan commented Jan 20, 2022

would you like to update the OpenCL headers to the latest version containing your change?

Sure! I will sync everything.

@sherry-yuan
Copy link
Contributor Author

The sync is complete.

A caveat: one of the files we currently have does not exist in khronos registry.
for example: https://github.com/intel/fpga-runtime-for-opencl/blob/main/include/CL/cl_ext_intelfpga.h

I feel like we might not want to push these to khronos, but at the same time we do not want to have our own enum that potentially will conflict with future khronos headers. Things in this file need to be updated periodically.

@pcolberg
Copy link
Contributor

Thanks Sherry. Could you set the modes of the files back to non-executable (chmod -x *)?

KhronosGroup/OpenCL-Headers@80c10b1

cl_ext_intelfpga does not exist in ocl header but is still added in this repo because it is needed in profilers etc. This file potentially need to be updated once a while to avoid conflict with khronos header.

Upgrade default version to opencl core 3.0. This will not break existing functionality because we are currently already building with 3.0 (see CMakeLists.txt). All future version of opencl core is backward compatible.
clEnqueueWriteBufferRect function's parameter name changed in newly synced khronos header. Need to change source files as well
@pcolberg
Copy link
Contributor

Thanks @sherry-yuan! I pushed a minor revision that reverts the executable bit on include/CL/.clang-format and mentions the source commit of the files, KhronosGroup/OpenCL-Headers@80c10b1.

@pcolberg pcolberg merged commit a5f34eb into intel:main Jan 21, 2022
pcolberg added a commit to pcolberg/fpga-runtime-for-opencl that referenced this pull request Jan 24, 2022
This resolves warnings introduced with the OpenCL headers update.

intel#62

../include/CL/cl_ext_intel.h:19:105: note: #pragma message: The Intel extensions have been moved into cl_ext.h.  Please include cl_ext.h directly.
 #pragma message("The Intel extensions have been moved into cl_ext.h.  Please include cl_ext.h directly.")

Closes intel#66
pcolberg added a commit to pcolberg/fpga-runtime-for-opencl that referenced this pull request Jan 25, 2022
Note that opencl.h already includes cl_ext.h

This resolves warnings introduced with the OpenCL headers update.

intel#62

../include/CL/cl_ext_intel.h:19:105: note: #pragma message: The Intel extensions have been moved into cl_ext.h.  Please include cl_ext.h directly.
 #pragma message("The Intel extensions have been moved into cl_ext.h.  Please include cl_ext.h directly.")

Closes intel#66
pcolberg added a commit to pcolberg/fpga-runtime-for-opencl that referenced this pull request Jan 25, 2022
Note that opencl.h already includes cl_ext.h

This resolves warnings introduced with the OpenCL headers update.

intel#62

../include/CL/cl_ext_intel.h:19:105: note: #pragma message: The Intel extensions have been moved into cl_ext.h.  Please include cl_ext.h directly.
 #pragma message("The Intel extensions have been moved into cl_ext.h.  Please include cl_ext.h directly.")

Closes intel#66
pcolberg added a commit that referenced this pull request Jan 25, 2022
Note that opencl.h already includes cl_ext.h

This resolves warnings introduced with the OpenCL headers update.

#62

../include/CL/cl_ext_intel.h:19:105: note: #pragma message: The Intel extensions have been moved into cl_ext.h.  Please include cl_ext.h directly.
 #pragma message("The Intel extensions have been moved into cl_ext.h.  Please include cl_ext.h directly.")

Closes #66
pcolberg added a commit to pcolberg/fpga-runtime-for-opencl that referenced this pull request Jan 28, 2022
pcolberg added a commit to pcolberg/fpga-runtime-for-opencl that referenced this pull request Jan 28, 2022
pcolberg added a commit to pcolberg/fpga-runtime-for-opencl that referenced this pull request Jan 28, 2022
This amends intel#62

OpenCL layers are an experimental feature which we don't use, but there
is no downside to installing the header for the sake of completeness.

https://github.com/KhronosGroup/OpenCL-ICD-Loader/blob/cd7d07cfa667d8d959b4272be45cf217a65c2948/README.md#about-layers
pcolberg added a commit that referenced this pull request Jan 28, 2022
This amends #62

OpenCL layers are an experimental feature which we don't use, but there
is no downside to installing the header for the sake of completeness.

https://github.com/KhronosGroup/OpenCL-ICD-Loader/blob/cd7d07cfa667d8d959b4272be45cf217a65c2948/README.md#about-layers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants