Intel® Math Kernel Library 2018 Developer Reference - C
For computations in the Automatic Offload mode, sets the fraction of the work for the specified coprocessor or host CPU to do.
int mkl_mic_set_workdivision (MKL_MIC_TARGET_TYPE target_type, int target_number, double wd);
Name |
Type |
Description |
---|---|---|
target_type |
MKL_MIC_TARGET_TYPE |
Type of the target device. Use one of the following values:
|
target_number |
int |
The device to set the fraction of work for. Takes the following values:
If target_type = MKL_TARGET_HOST, the function ignores the target_number parameter, which may have any value. |
wd |
double |
The fractional amount of the work that the specified device should do, where 0.0 ≤wd≤ 1.0. Specifying MKL_MIC_AUTO_WORKDIVISION for wd indicates that Intel MKL should determine the amount of the work for the specified device. |
If you are using Intel MKL in Automatic Offload mode, the mkl_mic_set_workdivision function specifies how much work each Intel Xeon Phi coprocessor or the host CPU should do. This function takes precedence over the MKL_HOST_WORKDIVISION, MKL_MIC_WORKDIVISION, and MKL_MIC_<number>_WORKDIVISION environment variables (see the Intel MKL Developer Guide for details).
Intel MKL interprets the fraction of work set by the mkl_mic_set_workdivision function as guidance toward dividing work between coprocessors, but the library may choose a different work division if necessary.
Intel MKL resolves the collision that arises if the sum of all the work-division fractions does not equal one.
For LAPACK routines, setting the fraction of work to any value other than 0.0 enables the specified processor for Automatic Offload mode. However Intel MKL LAPACK does not use the value specified to divide the workload. For example, setting the fraction to 0.5 has the same effect as setting the fraction to 1.0.
Name |
Type |
Description |
---|---|---|
ierr |
int |
Result status: = 0 Indicates that the fraction is successfully set. < 0 Indicates a failure to set the fraction. |