Hello,
I am doing my final degree project about a script that optimize OpenCL projects, changing the kernels from OpenCL to SPIR-V and optimizing in different ways the SPIR-V to evaluate all the times and compare them.
I was initially using only projects which host are written in C, because change the host kernel creation to SPIRV is just change the command clCreateProgramWithSource()
to clCreateProgramWithIL()
, and also create the parameters to fit the new command, but is not difficult.
I want to ask if it is possible to do this also in C++, I mean, the way how I can change the C++ host to use a SPIR-V kernel instead of a OpenCL kernel.
I have seen that the function used is cl::Program program(context, kernel). I can just use in the parameter kernel a SPIR-V kernel instead of a OpenCL kernel or do i have to change more things to make it work well?
If someone is interested in the project and can help me, contact me at enrique.gonzalezr@alumnos.upm.es, I will be very thankful because I have more doubts about other things and if an expert could help me it will make me much easier to finish correctly my project.
Cheers,
Enrique