Developer Guide,

  • ,
  • 2020 Update 2
  • 07/16/2020
  • Public Content,
  • Download as PDF

Building with Intel® SDK for OpenCL™ Applications - Offline Compiler Command-Line Interface

Intel® SDK for OpenCL™ Applications Developer Guide
The Intel® SDK for OpenCL™ Applications 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 the
x86
or
x64
folder, depending on OS.
FPGA support was removed from the Intel® SDK for OpenCL™ Offline Compiler. If your workflows require this functionality, please use Intel® SDK for OpenCL™ Applications 2020 Update 1, or Intel® FPGA SDK for OpenCL™.
To use the offline compiler command-line interface:
  1. Start the command-line.
  2. Type
    ioc64
    to run the 64-bit version
  3. 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:
  • cpu
    - Intel CPU device, which is
    Default
  • gpu
    - Intel Graphics device
-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:
  • sse42
    - Streaming SIMD Extensions 4.2
  • avx
    - Intel Advanced Vector Extensions (Intel AVX)
  • avx2
    - Intel Advanced Vector Extensions 2 (Intel AVX2)
-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.
-llvm[=<file_path>]
Generates LLVM code.
-ir[=<file_path>]
Generates intermediate representation binary.
-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.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.