Hi,
I'm working on a project where I'm using OpenCL 2.1 NEO and I want to know if I can use C++ inside the kernel code. I see AMD has that feature and also OpenCL 2.1 it has C++ specs. But I'm not able to use the C++ code inside the kernel.
Link Copied
Hi SujayS,
Thanks for the interest and the question. I think your question can help a lot of users, so I'm linking some useful resources for users who want to develop with OpenCL-C++ and Intel Graphics Compute Runtime for OpenCL Driver (NEO).
At this time, NEO can ingest SPIR-V. Exploring compilation of OpenCL-C++ to SPIR-V may help you. Here are some overview references and examples:
Some spellings for toggles may have been updated between clang version so picking a toolchain to fit your needs may not be so trivial. The Khronos SPIR repo looks like a good place to start to keep it simple.
Hopefully, browsing the above guidance can help you get there. Please let us know how your exploration goes.
-MichaelC
SujayS,
Also noteworthy, the ioc64 tool, can compile SPIR-V to both Intel CPU and Intel Graphics Technology (NEO enabled) targets. You may wish to use it to check offline compilation for targets of interest. The ioc64 tool comes with Intel® SDK for OpenCL™ Applications and the Intel® oneAPI beta Data Parallel C++ Base Toolkit.
ioc64 maintainers monitor these forums so if you have SPIR-V usage feedback for Intel platforms this would be a good thread to speak to your experience.
-MichaelC
I'd like to add a few additional links to Michael's excellent list above:
Finally, if you are interested in a more complete end-to-end C++ experience, I'd encourage you to take a look at SYCL and Intel oneAPI Data Parallel C++. More information about Data Parallel C++ can be found here: https://software.intel.com/en-us/oneapi/dpc-compiler
Thanks!
For more complete information about compiler optimizations, see our Optimization Notice.