Quantcast
Channel: Intel® Software - OpenCL*
Viewing all articles
Browse latest Browse all 1182

OpenCL compiler flags

$
0
0

Hi all,

I want to influence optimization flags of OpenCL. As I'm not aware of optimization flags, that do not influence correctness, that are available for the online compiler I have decided to use the offline compiler. I have found that Intel OpenCL kernel builder is able to generate llvm code beside IR code. As there is Intel LLVM Optimizer, i.e., oclopt, which could generate bit code, i.e., .bc file, which is not a final binary. This file cannot be used directly in the OpenCL program, i.e., cannot be read with clCreateProgramWithBinary as it returns

Stack dump:
0.	Running pass 'Intel OpenCL DuplicateCalledKernels' on module 'Program'.

followed by segmentation fault.

Now I'm interested in the following:

1. How to generate the binary that can be used with clCreateProgramWithBinary but generated with different optimization switches from llvm optimizer? Does Intel provide missing compiler chain from Optimizer to Binary generation, tool(s) that can take output of llvm optimizer, i.e., bit code, and generate a binary?

2. Are there environment flags or any other mechanism to influence the optimizer with online compilation and/or offline compilation of OpenCL codes?

 

Thank you in advance for your effort.

Looking forward for your response.

Best regards,

Robert


Viewing all articles
Browse latest Browse all 1182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>