When using SOL on X86 CPUs we strongly recommend to set the following OMP env var.
export OMP_PROC_BIND=TRUE
| EnvVar | Default | Description |
|---|---|---|
| CXX | “g++” | Path to g++ |
| CPATH | Used as include paths | |
| C_INCLUDE_PATH | Used as include paths | |
| CPLUS_INCLUDE_PATH | Used as include paths | |
| LIBRARY_PATH | Used as library paths |
Further see OpenMP Environment Variables.
| Flag | Default | Description |
|---|---|---|
| gcc_arch | native | Sets GCC’s -march value. |
| gcc_tune | native | Sets GCC’s -mtune value. |
| ispc_vector | native | Sets ISPC’s vector instructions. By default uses the system’s current max available vector instructions. Valid options: native, sse2, sse4, avx, avx2, avx512, arm64. |
If you are compiling on an AVX512 machine and want to deploy to a AVX2 machine,
you need to set sol.deploy(..., gcc_arch='x86-64-v3', gcc_tune='generic',
ispc_vector='avx2'), but you can also target more precisly with
gcc_arch='haswell if you know the exact architecture.
To get a list of available architectures run gcc -march=help -c -x c /dev/null.
SOL can make use of OneDNN’s Tensor cache. This allows to to precompute some of model parameters in inference, improving the execution performance.
For this just set the env var and adjust the size (in MB) accordingly to your model:
export ONEDNN_GRAPH_CONSTANT_TENSOR_CACHE_CAPACITY="cpu:1024"
| SOL performance using X86 is really really bad, what can I do? | |
|---|---|
|
tl;dr; run once: Unfortunately some python packages (e.g., torch
or sklearn) ship their own version of If you need to run this fixing within your script, because you are using a fully automated process, then you can use: |