Using Intel® Distribution for Python* with the Xeon Phi™ Coprocessor

By Gergana S. Slavova, Published: 08/23/2016, Last Updated: 08/23/2016

The Intel® Distribution for Python* mkl-mic package allows Automatic Offload (AO) of workloads to Intel® Xeon Phi™ Coprocessors.

AO is currently only available on Linux* platforms.

Follow these steps to enable AO:

  1. Install the mkl-mic package into your environment
    • ​If using the Intel® Distribution for Python*, run the following command:
      conda install mkl-mic
    • ​If using Anaconda* or Miniconda* with numpy and mkl packages already installed, run the following command:
      conda install mkl-mic intelpython -c intel --no-update-deps
  2. Source the mklmicvars.sh script located in your python bin directory:
    source mklmicvars.sh

Execution of certain python workloads will now automatically be offloaded to Intel® Xeon Phi™ coprocessors. For more information on which operations are considered for AO, see this article.

Other optional settings:

  • AO will transparently fall back to execution on the host CPU if AO is not available. To have operations report an error if AO is not occurring, set MKL_MIC_DISABLE_HOST_FALLBACK=1 in your environment.
  • To see reports of AO activity sent to stdout, set OFFLOAD_REPORT=1 in your environment. OFFLOAD_REPORT=2 will give you greater detail.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804