- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a question regarding the use of the CPU OpenCL backend in SYCL programs and whether it's possible to eliminate the requirement for the OpenCL runtime when running the program.
My understanding is that by compiling a SYCL program with AOT (Ahead-of-Time) compilation of kernels, it should not require the presence of the OpenCL runtime, as the device code is already compiled. However, I've encountered an issue where even after specifying the compilation option `/fsycl-targets=spir64_x86_64`, my program still appears to require the OpenCL runtime.
Is there a specific configuration or approach I should follow to ensure that my SYCL program, when using the CPU OpenCL backend, does not rely on the OpenCL runtime during execution? Any insights or guidance would be greatly appreciated.
Thank you in advance for your assistance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
OpenCL CPU RT is still required when executing your code.
Using AOT compilation can avoid the overhead of JIT compilation at runtime. With AOT compilation, the binary will contain the actual assembly code of the platform that was selected at compile time instead of the SPIR-V intermediate code. The advantage is that we do not need to JIT compile the code from SPIR-V to assembly during execution, which makes the code run faster. The disadvantage is that the code cannot run anywhere other than the platform for which it was compiled.
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
OpenCL CPU RT is still required when executing your code.
Using AOT compilation can avoid the overhead of JIT compilation at runtime. With AOT compilation, the binary will contain the actual assembly code of the platform that was selected at compile time instead of the SPIR-V intermediate code. The advantage is that we do not need to JIT compile the code from SPIR-V to assembly during execution, which makes the code run faster. The disadvantage is that the code cannot run anywhere other than the platform for which it was compiled.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your answer. I am accepting it as a solution.
Still, it is sad that there is no possibility to AOT-compile all the SYCL-device code for required targets so the application would not require that huge OpenCL for CPU runtime. This would greatly helped easier deploy the application on another computers. Usually the set of target architectures is well-known, so there is nothing bad to compile the code only for these targets and to not support others.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for accepting our solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page