Developer Guide for Intel® SDK for OpenCL™ Applications 2017
A newer version of this document is available. Customers should click here to go to the newest version.
Building with Intel® SDK for OpenCL™ Applications - Offline Compiler Command-Line Interface
Intel ® SDK for OpenCL ™ Applications standalone version provides an offline compiler command-line interface. The tool supports Intel® processors and Intel ® Graphics, and provides full offline OpenCL language compilation, which includes:
- Creating executable Intermediate Representation (IR) from source code
- Creating compiled object from source code
- Creating executable IR or library from object IR and libraries
The command-line tool is located in $(INTELOCLSDKROOT)\bin\ under x86 or x64 folder, depending on OS.
To use the offline compiler command-line interface:
- Start the command-line.
- Type ioc64 to run 64-bit version
- Type the run parameters in the following sequence:
ioc<version> -cmd=<command> -<argument> -<options>
The offline compiler supports the following commands:
| Command | Description | 
| -cmd=build | Creates executable IR from source code. Default command in case nothing is specified. | 
| -cmd=compile | Creates compiled object IR from source code. | 
| -cmd=link | Creates executable IR or library from object IR and libraries. | 
The offline compiler supports the following arguments:
| Argument | Description | 
| -input=<input_file_path> | Builds OpenCL code from the input_file_path file. Use the -input argument with the build and compile commands. | 
| -binary=<"binary_files"> | Links comma-separated binary files. Use with the link command. | 
| -version | Shows the tool version. | 
| -help | Shows help menu, containing the list of available commands, arguments, and options. | 
The offline compiler supports the following options:
| Option Use | Description | 
| -device=<device_type> | Selects target device type: 
 | 
| - targetos=<os> | Set target operating system if it is different from current. The command is supported only in 32-bit version of the tool. | 
| - simd=<instruction_set_arch> | Selects target instruction set architecture. Available on CPU device only. The following instruction set architectures are available: 
 | 
| -output[=<output_file_path>] | Writes build log into the output_file_path. When this option is specified, the build log does not appear in the command-line. | 
| - asm=[<file_path>] | Generates assembly code. | 
| - llvm[=<file_path>] | Generates LLVM code. | 
| -llvm-spir32[=<file_path>] | Generates 32-bit LLVM SPIR code. | 
| -llvm-spir64[=<file_path>] | Generates 64-bit LLVM SPIR code. | 
| - ir[=<file_path>] | Generates intermediate representation binary. | 
| -spir32[=<file_path>] | Generates 32-bit SPIR code. | 
| -spir64[=<file_path>] | Generates 64-bit SPIR code. | 
| -spirv32[=<file_path>] | Generates a 32-bit SPIR-V binary. | 
| -spirv64[=<file_path>] | Generates a 64-bit SPIR-V binary. | 
| -txt-spirv32[=<file_path>] | Generates 32-bit SPIR-V code. | 
| -txt-spirv64[=<file_path>] | Generates 64-bit SPIR-V code. | 
| -bo[="<build_options>"] | Adds comma-separated build options. |