• 04/03/2020
  • Public Content
Contents

System-Level Device Affinities

It is possible to direct execution to the specific device via the shell environment variable, for example, the following line enables only the GPU:
$ export VX_INTEL_ALLOWED_TARGETS=”gpu"
NOTE: Intel® MKL powered implementation of the CNN kernels for the CPU constitutes a separated target “mkldnn”. It accelerates only regular (32-bit) floating point numbers, and not the half precision (16-bit) floats.
Few important details:
  • By default (when VX_INTEL_ALLOWED_TARGETS is not specified), all targets are allowed.
  • The OpenVX run-time will attempt to respect order the targets are defined (for example, by trying the second traget only if some extension is not supported by the first target, and so on).
  • It is recommended to try performance scenario (especially for the graphs with CNN nodes, see the Intel's Extensions to the OpenVX* Primitives section) with the GPU target getting the highest priority in affinity list:
    $ export VX_INTEL_ALLOWED_TARGETS="cpu,mkldnn,gpu"
  • If your code uses extension that is not supported by the allowed targets, the graph execution will fail.
NOTE: To avoid failures due to the target not supporting some vision function, always put “cpu” to the list of allowed targets. Another alternative is to use finer-grain (per-node) control, described in the next section.

Product and Performance Information

1

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