• 10/30/2018
  • Public Content
Contents

Enabling Debugging in OpenCL™ CPU Compiler and Runtime

To enable the debugging mode in the OpenCL™ CPU Compiler and Runtime, specific options should be passed to the build options string parameter in the
clBuildProgram
function:
  • -g
    flag enables source-level debug information generation.
    Note
    Passing a
    -g
    flag means that no optimizations (such as inlining, unrolling, vectorization) are performed, the same as if a
    -cl-opt-disable
    option was passed.
  • -s /full/path/to/OpenCL/source/file.cl
    option specifies the full path to the OpenCL™ source file. If the path includes spaces, the entire path should be enclosed with double or single quotes. This option is required in cases where the source of an OpenCL™ kernel is passed to the
    clCreateProgramWithSource
    function as a string. Only one file can be specified with the
    -s
    option. If the file contains one or more
    #include
    directives, multiple paths for files with the
    -s
    option are not needed.

Product and Performance Information

1

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