You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/performance_tuning/launch_script.md
+19-17Lines changed: 19 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Available option settings (knobs) are listed below:
25
25
|`-h`, `--help`| - | - | show this help message and exit |
26
26
|`-m`, `--module`| - | False | Changes each process to interpret the launch script as a python module, executing with the same behavior as 'python -m'. |
|`--log-path`| str | '' | The log file directory. Setting it to empty ('') disables logging to files. |
28
+
|`--log-dir`| str | '' | The log file directory. Setting it to empty ('') disables logging to files. |
29
29
|`--log-file-prefix`| str | 'run' | log file name prefix |
30
30
31
31
Launcher Common Arguments:
@@ -78,7 +78,7 @@ Distributed Training Arguments With oneCCL backend:
78
78
79
79
The *launch* script respects existing environment variables when it get launched, except for *LD_PRELOAD*. If you have your favorite values for certain environment variables, you can set them before running the *launch* script. Intel OpenMP library uses an environment variable *KMP_AFFINITY* to control its behavior. Different settings result in different performance numbers. By default, if you enable Intel OpenMP library, the *launch* script will set *KMP_AFFINITY* to `granularity=fine,compact,1,0`. If you want to try with other values, you can use `export` command on Linux to set *KMP_AFFINITY* before you run the *launch* script. In this case, the script will not set the default value but take the existing value of *KMP_AFFINITY*, and print a message to stdout.
80
80
81
-
Execution via the *launch* script can dump logs into files under a designated log directory so you can do some investigations afterward. By default, it is disabled to avoid undesired log files. You can enable logging by setting knob `--log-path` to be:
81
+
Execution via the *launch* script can dump logs into files under a designated log directory so you can do some investigations afterward. By default, it is disabled to avoid undesired log files. You can enable logging by setting knob `--log-dir` to be:
82
82
83
83
- directory to store log files. It can be an absolute path or relative path.
84
84
- types of log files to generate. One file (`<prefix>_timestamp_instances.log`) contains command and information when the script was launched. Another type of file (`<prefix>_timestamp_instance_#_core#-core#....log`) contain stdout print of each instance.
@@ -119,7 +119,7 @@ __Note:__ GIF files below illustrate CPU usage ONLY. Do NOT infer performance nu
119
119
#### I. Use all physical cores
120
120
121
121
```
122
-
ipexrun --log-path ./logs resnet50.py
122
+
ipexrun --log-dir ./logs resnet50.py
123
123
```
124
124
125
125
CPU usage is shown as below. 1 main worker thread was launched, then it launched physical core number of threads on all physical cores.
You can also specify the cores to be utilized using `--cores-list` argument. For example, if core id 11-20 are desired instead of the first 10 cores, the launch command would be as below.
Launcher by default runs all `ninstances` for multi-instance inference/training as shown above. You can specify `instance_idx` to independently run that instance only among `ninstances`
@@ -516,16 +516,18 @@ Generally, Intel OpenMP library brings better performance. Thus, in the *launch*
516
516
517
517
#### GNU OpenMP Library
518
518
519
-
It is, however, not always that Intel OpenMP library brings better performance comparing to GNU OpenMP library. In this case, you can use knob `--disable_iomp` to switch active OpenMP library to the GNU one.
519
+
It is, however, not always that Intel OpenMP library brings better performance comparing to GNU OpenMP library. In this case, you can use knob `--omp-runtime default` to switch active OpenMP library to the GNU one. GNU OpenMP specific environment variables, *OMP_SCHEDULE* and *OMP_PROC_BIND*, for setting CPU affinity are set automatically.
2021-07-13 15:25:00,760 - __main__ - WARNING - Both TCMalloc and JeMalloc are not found in $CONDA_PREFIX/lib or $VIRTUAL_ENV/lib or /.local/lib/ or /usr/local/lib/ or /usr/local/lib64/ or /usr/lib or /usr/lib64 or /home/<user>/.local/lib/ so the LD_PRELOAD environment variable will not be set. This may drop the performance
529
+
2021-07-13 15:25:00,761 - __main__ - INFO - OMP_SCHEDULE=STATIC
530
+
2021-07-13 15:25:00,761 - __main__ - INFO - OMP_PROC_BIND=CLOSE
529
531
2021-07-13 15:25:00,761 - __main__ - INFO - OMP_NUM_THREADS=44
0 commit comments