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:

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:

  1. Start the command-line.
  2. Type ioc64 to run 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.

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