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.
1719 Discussions

Build multiple .cl files into single .ir

Mike_B_4
Beginner
472 Views

I am implementing a number of kernels. I have a requirement that these are built into a single .ir. However. I would like to keep my kernels in separate .cl files.

Is it possible, via ioc32 cmd line, to build separate cl files into a single .ir 

 

0 Kudos
3 Replies
Robert_I_Intel
Employee
472 Views

Please take a look at the following thread: https://software.intel.com/en-us/forums/topic/540194

You can concatenate multiple .cl files as a preprocessing step.

Alternatively, you can -compile individual .cl files and then -link (multiple files could be provided: see below)

-binary="<binary_files_paths>" - Link binary files, comma seperated if more than one (use with 'link' command)

 

0 Kudos
Mike_B_4
Beginner
472 Views

I've tried compiling .cls indivually (for gpu, CL version 1.2) and using the -link option, 

From the ioc32 command line this give a linkage error with no additional info.

Using OpenCL Code Builder. I compile the .cls and save as binary irs. If I select these and link I get an error 'No binary data found to save. Make sure you build/compile first"

Are there any build/link options I need to specify apart from setting -cl-std to CL1.2 in build options?

 

0 Kudos
Robert_I_Intel
Employee
472 Views

Use -spir64 option to output spir files: you wouldn't be able to link ir files.

0 Kudos
Reply