OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

Does Intel HD graphics 530 support SYCL or SPIR to pass classes to kernel?

vamsi_k_
Beginner
237 Views

I have been working on an c/c++ OpenCL solution for the past few weeks now. For my solution, I need to pass a class from my CPU(Host) to GPU(Device). When I try to pass the class as an argument it gives an error "Unknown Type-Identifier Class" in INTEL architecture. My doubt whether OpenCL on Intel Platform does it allow us to pass a class to kernel.

 I am working on Microsoft visual studio 2015. My doubt is

1. How can a pass a class to my Kernel.

2. Can I use SYCL/ Does Intel HD 530 support SYCL ?

3. I have also seen SPIR, can I use SPIR to pass class to the kernel

    i) My plaform just supports openCL2.0(Its Intel i5 6600, 6th Gen)

    ii) If it supports SPIR, please provide any links

    iii) In some resource it says SPIR is only supported on CPU ?

However, with respect to OpenCL I am not able to find any references and No examples related to this query. I would be really thankful to any help with regards to this issue. I have posted the same question on stack overflow website also but to no avail. If someone would be kind enough to help me this query.

 

0 Kudos
1 Reply
Jeffrey_M_Intel1
Employee
237 Views

Today our kernel compilers don't natively support C++ kernels.  However, because we do support SPIR and SPIR-V this does leave the option that a 3rd party tool could compile another kernel language (including one with C++ features) to these intermediate languages.  This isn't exactly the same as native kernel C++ since things like debugging and performance analysis are more indirect but may be at least part of what you are looking for.   

More info on Intel SPIR/SPIR-V:
https://software.intel.com/en-us/articles/using-spir-for-fun-and-profit-with-intel-opencl-code-build...
https://software.intel.com/en-us/articles/spir-v-is-a-better-spir-with-intel-opencl-code-builder

These may be of interest for C++:  
https://github.com/KhronosGroup/libclcxx
https://github.com/KhronosGroup/SPIR/tree/spirv-1.1.

And for SYCL:
https://www.codeplay.com/portal/earlyaccesstothesyclopenstandardforcacceleration
https://www.codeplay.com/portal/introduction-to-sycl

Just to set expectations, we're very interested in these new directions but our current scope is the components enabling SPIR/SPIR-V and below in the stack.   You will get more details, issue support, etc. for 3rd party tools compiling to SPIR/SPIR-V by working with those projects directly.

Reply